7

What i need to do is detect if user drag down the PIP window (drag down to dismiss). When I do so, the onPictureInPictureModeChanged method is called

but how can i detect the dismiss specifically?

Arik6
  • 93
  • 8

1 Answers1

2

Whenever user drag to dismiss the PIP window onStop() is called.

just add these lines.

 @Override
protected void onStop() {
    //your code here
    player.release();
    super.onStop();
    Log.v(TAG, "onStop()...");
}
Pritam Pawade
  • 637
  • 7
  • 21