Skip to content Skip to sidebar Skip to footer

How To Close Pip Picture In Picture Activity On Click Of Application Icon. I Have Multiple Activities In My App?

Please suggest for the issue related to android picture-in-picture mode, if my app has stack like HomeActivity -> DetailsActivity -> PlayerActivity now on clicking device hom

Solution 1:

To close PIP window while launching app using local broadcast, Implement local broadcast and send the broadcast from your launcher activity to PIP activity to close itself.

It is cleaner approach than finding the activity from all the running tasks and finish the task.

Solution 2:

On some of the Android 8 devices, the activityManager.appTasks did not contain the player activity (in pip mode). Using the Local broadcast was very helpful.

Post a Comment for "How To Close Pip Picture In Picture Activity On Click Of Application Icon. I Have Multiple Activities In My App?"