Disable picture-in-picture mode for some app

How can I disable picture-in-picture mode for an app (using code) or at least navigate the user to picture-in-picture settings for that app

Upvotes: 0

Views: 2439

Answers (2)

EagleEye1984
EagleEye1984

Reputation: 473

I wasn't able to find this settings either. What I did, is: entered settings, on the top right corner (location may vary) tapped magnifying glass and enter "picture". The option "picture-in-picture" showed up. Upon click I got to the "Special access" window ;-)

Upvotes: 0

PabloJ
PabloJ

Reputation: 308

You can disable or enable picture-in-picture for specific apps by going to

Android settings > Apps & notifications > Advanced > Special access > Picture-in-picture.

Sadly, this doesn't seem to be a Settings page that you are able to open up programmatically (you can find a list of all the Settings pages you can open using Intents here), and it doesn't seem to be able to be done programmatically- at least for other apps. If you want to disable picture-in-picture for your own app then just add android:supportsPictureInPicture=”false” to your AndroidManifest file.

Your best bet for disabling picture-in-picture for other apps is to tell the user to manually navigate to the settings page mentioned above to turn it off themselves.

Hope this helps!

Upvotes: 1

Related Questions