IPod music stops playing when app is started

Hi,
I have recognised that music that is played on an IPhone is stopped when my app ist started. I am not using any sound in my app so I would like that the music the user is listening to is continued when my app is started.
What do I have to do to archive this?

Thanks

Olaf [import]uid: 180388 topic_id: 34023 reply_id: 334023[/import]

Add this block of code to near the top of your main.lua

[code]
– Set the audio mix mode to allow sounds from the app to mix with other sounds from the device
if audio.supportsSessionProperty == true then
print(“supportsSessionProperty is true”)
audio.setSessionProperty(audio.MixMode, audio.AmbientMixMode)
end

– Store whether other audio is playing. It’s important to do this once and store the result now,
– as referring to audio.OtherAudioIsPlaying later gives misleading results, since at that point
– the app itself may be playing audio
isOtherAudioPlaying = false

if audio.supportsSessionProperty == true then
print(“supportsSessionProperty is true”)
if not(audio.getSessionProperty(audio.OtherAudioIsPlaying) == 0) then
print(“I think there is other Audio Playing”)
isOtherAudioPlaying = true
end
end
[/code] [import]uid: 199310 topic_id: 34023 reply_id: 135316[/import]

Add this block of code to near the top of your main.lua

[code]
– Set the audio mix mode to allow sounds from the app to mix with other sounds from the device
if audio.supportsSessionProperty == true then
print(“supportsSessionProperty is true”)
audio.setSessionProperty(audio.MixMode, audio.AmbientMixMode)
end

– Store whether other audio is playing. It’s important to do this once and store the result now,
– as referring to audio.OtherAudioIsPlaying later gives misleading results, since at that point
– the app itself may be playing audio
isOtherAudioPlaying = false

if audio.supportsSessionProperty == true then
print(“supportsSessionProperty is true”)
if not(audio.getSessionProperty(audio.OtherAudioIsPlaying) == 0) then
print(“I think there is other Audio Playing”)
isOtherAudioPlaying = true
end
end
[/code] [import]uid: 199310 topic_id: 34023 reply_id: 135316[/import]