Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INFO][Android] Current activity does not support picture-in-picture Issue #1371

Open
halfmoon-mind opened this issue Dec 31, 2024 · 1 comment
Assignees
Labels
new issue New issue which has not been checked yet

Comments

@halfmoon-mind
Copy link

halfmoon-mind commented Dec 31, 2024

An error message saying “Current activity does not support picture-in-picture” occurs on Android devices.


I am currently implementing Picture-in-Picture (PIP) functionality on an Android device. I followed the official documentation at the link below for the setup:
https://jhomlala.github.io/betterplayer/#/pictureinpictureconfiguration

After confirming that enablePictureInPicture returns true and then attempting to run PIP mode, I encountered an error.
This issue can be resolved by declaring android:supportsPictureInPicture="true" in the AndroidManifest.xml file.
Additionally, in the example, there was code that sets setBetterPlayerGlobalKey to arbitrarily assign a GlobalKey inside BetterPlayer, but I could not find that mentioned in the documentation.

It may also be helpful to check the following URL:
https://github.com/jhomlala/betterplayer/blob/master/example/lib/pages/picture_in_picture_page.dart

I am adding this issue to assist with debugging for anyone who may encounter the same problem.

@halfmoon-mind halfmoon-mind added the new issue New issue which has not been checked yet label Dec 31, 2024
@halfmoon-mind
Copy link
Author

Screenshot 2025-01-02 2:03:49 PM

Additionally, if you are unable to get PiP mode to run properly on iOS, please go to Signing &; Capabilities -> Background Modes in XCode and check all 3 boxes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new issue New issue which has not been checked yet
Projects
None yet
Development

No branches or pull requests

2 participants