0

I wonder if have any way to play a song and change to another activity and the music continues, but if you put the application in the background pause the music

Aleff Matos
  • 121
  • 8

2 Answers2

0

Look here Play background music in all activities of Android app

Community
  • 1
  • 1
UpmostScarab
  • 960
  • 10
  • 29
0

Make it simple !

Just try to start your MediaPlayer through a Service. Heres a small example how to do it.

After you got this you can pause your Song through the Service maybe in the onDestroy method of your Activity.

Hopes this helps !

Ahmet K
  • 713
  • 18
  • 42