I’m creating a music player app.
If in background the default music player is running and if I use my app to play music, both runs simultaneously.
Is there a way to stop background music player.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If your app takes the audio focus, that should cause the current player to stop. Details are at http://developer.android.com/training/managing-audio/audio-focus.html#RequestFocus
There’s a bunch of other niceties; you probably want to register yourself as the media button event receiver, so that it’s your app that stops and starts playing. See http://android-developers.blogspot.com.au/2010/06/allowing-applications-to-play-nicer.html for details on that.