I wan’t my mediaPlayer to continue playing when the user opens a new Intent to access a menue.
I thought this could be handeled like this:
- Pause the Player
- Put player into the extra bundle
- Pass bundle to new menueIntent
- Let menueIntent call player.start()
But even if this will work, I guess it will suffer from lags.
Is there any way to continue playing background sound when the current intent is paused?
Why bother so much when you have a thing called
Service? Just create aService, put your playing code inside it and communicate with theServicefrom anyActivityyou want. You can read more aboutServiceshere. Hope this helps.