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.
Questions tagged [android-picture-in-picture]
84 questions
46
votes
6 answers
How Do We Leave Picture-In-Picture Mode?
We have enterPictureInPictureMode() to move an activity from its current form into a picture-in-picture representation.
What is the means by which we revert that, returning the activity to its normal state, besides destroying the activity? There is…

CommonsWare
- 986,068
- 189
- 2,389
- 2,491
18
votes
1 answer
Task List and Back Stack with Android O Picture in Picture mode
Has anyone got any experience or advice on managing back stack and tasks in PiP mode for android O?
Entering PiP mode seems to detach the activity from the current task stack. And exiting doesn't restore it.
Chrome seems to handle the back stack…

RyanJohnstone
- 802
- 1
- 9
- 21
9
votes
1 answer
Error "Device doesn't support picture-in-picture mode" entering PIP (picture in picture) mode on Samsung mobile
I'm using PIP mode on Android O phone (various Samsung versions) and it works fine. However, if I turn on accessibility mode I get
java.lang.IllegalStateException·enterPictureInPictureMode: Device doesn't support picture-in-picture mode
when…

alexbtr
- 3,292
- 2
- 13
- 25
8
votes
0 answers
Scaling problems and 3 second delay entering/exiting Picture-in-Picture mode with Floating / Translucent windows
Using floating/translucent windows with Android PIP causes a 3 second delay plus scaling issues. I've put together a sample app to demo the problem. I'm thinking there is some combination of tags I am either using incorrectly or completely missing…

Java42
- 7,628
- 1
- 32
- 50
7
votes
0 answers
YouTubePlayerSupportFragment is stopped with black screen in Picture-in-Picture
I am trying to play YouTube videos Picture-in-Picture mode without stopping in PIP mode. But the video stops playing on entering PIP with black screen and it will not play even after manually calling the player.play() methods. Only way i see it…

demistify
- 71
- 3
7
votes
1 answer
How to detect if user drag PIP window (drag down to dismiss)?
What i need to do is detect if user drag down the PIP window (drag down to dismiss).
When I do so, the onPictureInPictureModeChanged method is called
but how can i detect the dismiss specifically?

Arik6
- 93
- 8
6
votes
0 answers
Blinking Video/SurfaceView when resizing to PiP mode
I'm working on PiP mode in my app. In fact it is working pretty fine, but I have a problem with blinking/disappearing video for a split second.
I have VideoActivity in "fullscreen"/normal mode. I'm calling enterPictureInPictureMode(); and Activity…

snachmsm
- 17,866
- 3
- 32
- 74
6
votes
4 answers
Launching Intent from notification opening in picture-in-picture window
I've followed the Android picture-in-picture documentation. That is to say, my PiP activity is marked android:launchMode="singleTask", android:resizeableActivity="true", and…

Andrew
- 20,756
- 32
- 99
- 177
6
votes
4 answers
How to know if user has disabled Picture in Picture feature permission?
and here is another example:
from the screenshot above we see user is able to disable picture in picture mode. you can find it in the "special app access" screen on the emulator api 27 . How can i detect if user has disabled this feature ?
i…

j2emanue
- 60,549
- 65
- 286
- 456
5
votes
0 answers
Android12 - StartActivity not working post Picture-in-Picture mode Expansion
I am working on an App which uses Android's Picture-in-Picture Mode.
The MainActivity has a button which launches some other activity(simply fire intent to another Activity). The issue occurs when i enter the PIP Mode and expands the MainActivity,…

Amritpal Singh
- 984
- 2
- 14
- 33
5
votes
1 answer
Picture in Picture Opens new window of the app and shows tons of recent tasks
I am playing my videos in PIP mode when on Pressback button.
Everything is fine. video playing perfectly. navigation etc.
But problem is when i Close PIP mode.
There is new window created on my recent apps window.
IMAGE.
See those white windows…

Jithin Angel'z Jas'z
- 117
- 2
- 10
5
votes
0 answers
From Picture-in-Picture activity to Back-Stack activity not working in android?
I have two activity A & B, A activity have list of videos. After click the video it goes to B(Player) activity to play video.
Issue faced
A(Video List) --> B(Player Activity)
When i click the back button B activity goes to PIP mode. Now A is…

Yugesh
- 4,030
- 9
- 57
- 97
4
votes
2 answers
Android Picture-in-picture mode, open another activity of my app
I have a video call activity and I am using pip mode for it. In pip mode, I try to open related chat activity using remote action. But when a startActivity is called from pip activity, the new activity is being opened in the pip screen too. But I do…

buttib
- 113
- 3
- 12
3
votes
0 answers
YouTube stops playing video in Picture in Picture mode
YouTube video plays on a normal screen. However, when I switch to PiP mode. It stops playing it with no error.
Not sure what is wrong with the following code snippet:
class YouTubeVideoActivity : YouTubeBaseActivity(),
…

Umang Kothari
- 3,674
- 27
- 36
3
votes
0 answers
playing YouTube video in PIP mode like WhatsApp
I am currently wokring in project where I've to implement a feature (PiP mode)in which if a user clicks on the youtube link, it should play in PIP mode like WhatsApp. I am using Youtube Android Player API. I'm able to put the video in PiP mode but…

RIO DROID
- 51
- 3