Hi I need to stop sound from mediaplayer on screen Lock As I am using
if(mp!= null && mp.isPlaying()){
mp.stop();
}
in onPause() . But there is no result. So, How can I stop my media player sound after screen is locked.
To say exactly, I have 16 mp3 files, which will come in random.if a sound is playing and the screen is locked, present sound is Stopped and next one sound is playing.After screen is unlocked, it will works as proper & when the screen is locked , Again same is repeating on my Android 2.3.6 version mobile. How to overcome this.
Thank you.