I am developing a game for iOS using libGDX and Robovm; however, I need to make it possible for the user to keep background music (ipod or other apps) playing while playing the game.
I added the configuration parameter allowIpod
to IOSApplication
:
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
config.orientationLandscape = true;
config.orientationPortrait = false;
config.allowIpod = true;
return new IOSApplication(new Game(), config);
}
However, if the music was playing before starting the app, it keeps playing after opening the game. But, if I start the game, then press Home button, then play music, then return to the game, the music stops.
Has anybody encountered similar case? Any help please!
Thank you