Questions tagged [android-picture-in-picture]

Android 8.0 (API level 26) allows activities to launch in picture-in-picture (PIP) mode. PIP is a special type of multi-window mode mostly used for video playback. It lets the user watch a video in a small window pinned to a corner of the screen while navigating between apps or browsing content on the main screen.

For more info visit official site

84 questions
2
votes
1 answer

Floating Video View in Android

What I am trying to do is the following: I have a fragment that has scrollview with a video on top. What I am a trying to achieve is having the video to float when I scroll. Similar behavior to this link:…
2
votes
1 answer

how to play youtube video inside my activity picture in picture mode

I need to play youtube video inside my application in picture in picture mode without resizing my original activity just want to display youtube in full screen or picture in picture mode, similar kind of feature like whatsapp play youtube video. I…
dev_swat
  • 1,264
  • 1
  • 12
  • 26
2
votes
1 answer

How do I create a custom screen size for picture in picture mode for android?

I am trying to implement a picture-in-picture mode in my app similar to what we see when we click a youtube link in Whatsapp. Is it possible to create a similar view in our app. Currently I'm letting Android to set my default screen size. This is…
1
vote
1 answer

Custom views inside FrameLayout issue in Picture-in-picture RTL layout

I have a full screen FrameLayout which contains four Views that I add at runtime: repeat(4) { i -> val view = View(this).apply { setBackgroundColor(COLOR[i]) } views += view container.addView(view) } and to handle…
1
vote
1 answer

Android 13 - Picture-in-picture mode - change action icon

I have an activity player which is streaming a content, this activity can go into picture-in-picture mode, everything is working fine as expected so far, but on Android 13 the play/pause button icon is not getting updated. I will post my…
1
vote
0 answers

Is it possible to have shared element transition animation across tasks?

I had a shared element transition animation between two fragments ex: fragment A and fragment B. everything worked perfectly. until: Had to make (activity B which holds fragment B) a singleTask and specified a task affinity which means that it will…
1
vote
1 answer

How to display a certain view from layout in Picture in Picture mod in android?

I am trying to implement pip mode in android. There is a LiveStreamActivity which contains these elements: Header layout, VideoStream layout and custom popup that I show programatically. Their contexts are the same: LiveStreamActivity. When I enter…
1
vote
1 answer

How to start picture in picture mode instead of going to background? Like youtube premium

I know how to enable picture-in-picture mode itself when an app runs normally but the problem is that I want to activate it when the app goes to background mode i.e. on activity pause. A good example of such behavior is YouTube premium app on…
1
vote
0 answers

How to enable PIP on Android with React Native

I'm using react-native-video to show videos for both iOS and Android with React native .64, but I can't seem to find anywhere that would allow me to do PIP like the prop in react-native-video. There was a PR that seemed to address it, but it was…
1
vote
2 answers

Switching back to previous task in android

I have three activities A, B, and C. As expected when C is changed to pip (picture in picture) mode, it is separated out as a new task. When back pressed is pressed on Activity C, it will be finished and the user will be sent to the android system…
1
vote
1 answer

Android: How to show AlertDialog in PIP mode?

Whenever there is an error we are showing AlertDialog to inform user. But when in PIP mode this dialog is rendered inside PIP window as it can be seen in attached screenshots. Is there any way to show proper alert AlertDialog out side PIP window?
DCoder
  • 3,486
  • 7
  • 36
  • 68
1
vote
1 answer

Activity has leaked window while using PiP

My app shows video streaming using exoplayer. All works ok until i use/activate Pip. After i put any video in Pip and go back to prev activity from backstack ( automatically ) when i press any button i get : WindowManager: android.view.WindowLeaked:…
BejanCorneliu
  • 65
  • 3
  • 13
1
vote
1 answer

How to force kill Picture and Picture activity on cross icon click?

i am trying to kill activity from tasks after picture and picture mode was activated and so far I tried finish(), finishAffinity(), onBackPressed(), programmatically set excludeFromRecent but activity still lives on in background.. We can see same…
1
vote
1 answer

How to remove SKIP_TO_NEXT and SKIP_TO_PREVIOUS buttons from PIP window on Android?

I am using exo-player and media session extension like this. mediaSessionCompat = new MediaSessionCompat(activity, activity.getPackageName()); MediaSessionConnector sessionConnector = new…
1
vote
1 answer

Android onUserLeaveHint() in not called when back button is pressed

I am trying to implement PIP mode and to do so I am overriding onUserLeaveHint() to register events when the user is leaving the activity, but it is not called when the Back button is pressed, it only registers the home or recents button. …