I've followed the Android picture-in-picture documentation. That is to say, my PiP activity is marked android:launchMode="singleTask", android:resizeableActivity="true", and android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation" in the manifest.
Picture-in-picture seems to work great. However, I have noticed a case where I am experiencing undesirable behavior.
When my app receives a push, I create a PendingIntent with an Intent for MyActivity (different Activity than the PiP Activity). However, when I tap on the notification and the Intent is used, MyActivity is launching inside the PiP window!
I've tried adding android:launchMode="singleTask" to MyActivity in the manifest. I've also tried adding that flag programmatically to the Intent before using it with PendingIntent.getActivity(). This does not seem to fix the issue.
Can anyone tell me how to prevent this?



