Keep iPod music playing when app starts

At the moment it seems that whenever you boot a corona app on iPhone your iPod music stops. I understand most games do this and that the user can start their music again once the app is booted, but is there anyway to stop the users music being paused? [import]uid: 10084 topic_id: 8808 reply_id: 308808[/import]

I am also searching for a solution for this. Someone please help? [import]uid: 55021 topic_id: 8808 reply_id: 43879[/import]

This is not yet supported. [import]uid: 52491 topic_id: 8808 reply_id: 44018[/import]

Hope this will be in the near future. Thanks. [import]uid: 55021 topic_id: 8808 reply_id: 44158[/import]

+1 :slight_smile: [import]uid: 13859 topic_id: 8808 reply_id: 50368[/import]

I just wanted to check in an see if this has been added. I search through the api list but didn’t see anything. I am beta testing my first app and the one thing most people have commented is that their music stops playing when the app starts. I guess a lot of people want to use their own music. [import]uid: 39370 topic_id: 8808 reply_id: 97426[/import]

Yes, this is possible. Follow the link to Audio Session Services under the Audio Notes documentation page:
http://developer.anscamobile.com/partner/audionotes
[import]uid: 7563 topic_id: 8808 reply_id: 97432[/import]

Thank ewing!

I put this at the beginning of my entire app-seems to be working just fine. I was a little nervous when I read all the warning that came with using this api but looks good now.

[lua]if audio.getSessionProperty( audio.OtherAudioIsPlaying ) == 1 then
audio.setSessionProperty(audio.MixMode, audio.AmbientMixMode)
end[/lua] [import]uid: 39370 topic_id: 8808 reply_id: 97434[/import]

Hello,

I am testing my app on my device and my music plays in the background… Will this always work, even when i distribute it ? Because It works for me… [import]uid: 23689 topic_id: 8808 reply_id: 97439[/import]

I am trying to implement this so someone can continue to play music while using the app. So far I have not been successful.

I added this at the beginning of main.lua:

if audio.getSessionProperty( audio.OtherAudioIsPlaying ) == 1 then   
 audio.setSessionProperty(audio.MixMode, audio.AmbientMixMode)  
end  

But no improvement. When I start the app, music stop and when I exit (or press home button), the music starts back again. What else do I have to do?

I am using the latest build 875. [import]uid: 19297 topic_id: 8808 reply_id: 119130[/import]

ckausik: I think you are asking a different question. The original question was about letting the iPod music player continue playing while your app is running.

Your question seems to be the reverse; you want your app to continue playing when the user leaves your app. I think that is covered in the Audio Notes thread too. You need to declare that your app supports (true) background operation via a build.settings/plist setting for ‘audio’. Please read up on that thread because there significant limitations with running as a background process.

[import]uid: 7563 topic_id: 8808 reply_id: 119132[/import]

Sorry, I was not clear. I wanted to mean “the iPod music player continue playing while my app is running.” [import]uid: 19297 topic_id: 8808 reply_id: 119134[/import]

You must make sure that code you pasted is run before any other audio calls. If you are requiring other modules that make audio calls, then you need to make sure you require those modules after that code.
[import]uid: 7563 topic_id: 8808 reply_id: 119136[/import]

Yippee… working now. I added at the top of the appropriate modules. [import]uid: 19297 topic_id: 8808 reply_id: 119147[/import]