android / android/media-samples

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

Open
#24 16 comments 11 reactions 0 assignees View on GitHub
migrated googlesamples
Dominant language
Kotlin
Stars
1.4k
Forks
781
PR merge metrics
No merged PRs in 30d

Description

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

``` java
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)
```

Contributor guide

Open the contributing guide

Research direction

Start at MainActivity.updatePictureInPictureActions (line 156) and reproduce the failure on the stated Android API O emulator configuration. Trace the sample flow through MainActivity and MovieView, then establish whether the issue requires a code change or documentation for devices that do not support picture-in-picture; done means the sample behavior is verified for that configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.