question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

setPictureInPictureArgs: Device doesn't support picture-in-picture mode.

See original GitHub issue

Can not run this sample on Android emulator (API O , Target Android 7+ Google API). the exception is,

 java.lang.IllegalStateException: setPictureInPictureArgs: Device doesn't support picture-in-picture mode.
           at android.os.Parcel.readException(Parcel.java:1923)
           at android.os.Parcel.readException(Parcel.java:1861)
           at android.app.IActivityManager$Stub$Proxy.setPictureInPictureArgs(IActivityManager.java:9378)
           at android.app.Activity.setPictureInPictureArgs(Activity.java:1984)
           at com.example.pip.MainActivity.updatePictureInPictureActions(MainActivity.java:156)
           at com.example.pip.MainActivity$2.onMovieStarted(MainActivity.java:101)
           at com.example.pip.widget.MovieView.play(MovieView.java:350)
           at com.example.pip.widget.MovieView$3.onPrepared(MovieView.java:384)
           at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:3170)
           at android.os.Handler.dispatchMessage(Handler.java:102)
           at android.os.Looper.loop(Looper.java:156)
           at android.app.ActivityThread.main(ActivityThread.java:6440)
           at java.lang.reflect.Method.invoke(Native Method)
           at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:746)

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:11
  • Comments:16

github_iconTop GitHub Comments

6reactions
sezncommented, Oct 15, 2018

Same for me, seems we dont have any method for know if PIP is disactivated. When desactivate the PIP in Application’s params, the crash occurs, cause getPackageManager().hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE) still returns true

3reactions
benbaxtercommented, Nov 16, 2017

Is this still an issue after the API 27 release? Is it only occurring on the API 26 image?

Side note, if a device does not support PIP, you can check with the package manager.

PackageManager packageManager = getApplicationContext().getPackageManager();
boolean supportsPIP = 
        packageManager.hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE);
if( supportsPIP ) {
    enterPIP();
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error "Device doesn't support picture-in-picture mode ...
I think a better solution is to put try/catch around enterPictureInPictureMode in onUserLeaveHint. It covers all the possible cases including ...
Read more >
Picture-in-picture (PiP) support - Android Developers
The video continues playing in PiP mode while the main screen displays a content selection activity. Declare picture-in-picture support. By default, the system ......
Read more >
Adopting Picture in Picture in a Custom Player
This class lets you implement the same PiP behavior found in AVPlayerViewController in your custom player. Configure Audio Session and Background Modes. To ......
Read more >
Picture in Picture with the Native SDKs
PIP mode works on top of the app, the device background and other applications. Supported versions. Picture in picture mode is supported with ......
Read more >
7 Tips to Fix Picture in Picture Mode Not Working Issue in iOS 14
The first thing you need to ensure is that the app you're using supports the PiP mode feature. It is entirely up to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found