Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect if user drag PIP window (drag down to dismiss)?

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?

like image 587
Arik6 Avatar asked Jul 02 '19 09:07

Arik6


1 Answers

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()...");
}
like image 83
Pritam Pawade Avatar answered Oct 31 '22 22:10

Pritam Pawade