Search code examples
androidandroid-mediaplayer

Android Audio Player Start playing another song with already playing song


I m Making an audio player (android).The question is when i start my app > play Song >press the back key or home the song Still play's in background But when i open the app again it start new song playing where the old song is also playing. How to get Rid of this?


Solution

  • The Problem Was i was not aware of Service which run in background. Now i am using a service for plating song and updating activity UI from service and when my app is in background the song plays and as i reopen the app and select another song the previous stop playing and new song start playing Thanks every body for help