In Android, When I press back/home button the music stops (that’s fine), but when I re-enter to the activity I want to begin/resume playing back the music.
How does Android manage playback of audio when the program goes into the background?
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.
Ordinarily, you should include a lot more details and code about your problem, but I just happened to see your other post on a related matter.
You need the following in
onResume(). Note, if you are doingmp.start()inonCreate(), you can remove that start asonResume()is called afteronCreate().start()fromMeidaPlayerwill start over if stop or never played, or from where paused if it was paused.