0

HOW TO PAUSE THE VIDEO ON SCREEN OFF(SCREENLOCK)

How to add a function in Screen_Off? For eg: I have a video playing in the activity,It should be paused while the screen is off! What should i do for that?

23rd Jan 2018, 11:10 AM
Sujitha M Sivan
Sujitha M Sivan - avatar
1 ответ
0
when the screen turns off, onPause is called then onStop. Stop the video in onPause and it should work
23rd Jan 2018, 11:55 AM
Jeremy
Jeremy - avatar