Open haohaozaici opened 6 years ago
don't finish the activity
I need the same callback to finish my activity. I am working with GLSurfaceView and PIP, my game renders in the PIP mode well, but i would like to destroy my resources and finish the game activity on PIP CLOSE. Help appreciated!
don't finish the activity
are you ok? don't answer to questions if you have no idea what are you talking about
yeah, it seems close button on the PIP just stops the activity but doesn't destroy it, I would expect it be finished as it happens with back button behavior
@haohaozaici You can do something like this:
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
super.onPictureInPictureModeChanged(isInPictureInPictureMode);
if (!isInPictureInPictureMode) {
// Pip is closed here
}
}
when pip window was closed, my app still playing the video. i'm unwilling to stop video when onStop called, because maybe it just restored fullscreen. So i hope receive closed callback, i can really destroy activity and release my MediaPlayer.