Open yangxu4536 opened 5 years ago
In your base activity place this code in onPause() method
@Override public void onPause() { super.onPause(); try { if (PlayerManager.getInstance().getCurrentPlayer() != null) { PlayerManager.getInstance().getCurrentPlayer().onActivityPaused(); } } catch (Exception e) { e.printStackTrace(); } }
I try it but not solve my problem, can you give more detail infomation?
when from back to front, the log are below:
PlayerManager.getInstance().getCurrentPlayer().pause(); >> use this and check whether still audio in background or not ??
i play video in a activity, and i pause the video when swith to other app. when i come back to my app, the video auto play. i want video to stay pause because i pause it when last leave.