Skip to main content
Participating Frequently
April 13, 2012
Question

AIR 3.3 stop background audio when another audio app is launched?

  • April 13, 2012
  • 4 replies
  • 1485 views

I currently have audio playing in the background in my AIR app for iOS. My problem is that when you have the audio playing in the background, and you launch any other audio app on your phone...the audio starts to overlap because my AIR app does not stop playing audio. So when you open Pandora, Music, IHeartRadio, Youtube, etc...the AIR audio still plays.

Is this fixed in the AIR 3.3 release with the <executeInBackground> tag? Or is there another way for my AIR app to recognize that another audio app is launching? All the afformentioned apps play nice together like that.

I would think this would be grounds for not being accepted in the iTunes store.

I really need some answers because my app is set to go live soon and this will be a game changer if I cannot fix it. I will probably have to try and create it in objective C

Thanks in advance for any help!

-- I posted this in the wrong place last night and meant to post it here. --

This topic has been closed for replies.

4 replies

Adobe Employee
April 13, 2012

AIR audio mixing with audio of other apps running in background is not a bug. Its an important use case for game developers who would like their app to mix with background audio like songs and the user can choose to pause or mute the game audio if he wishes to continue listening to background audio and still play the game.However your app maybe requiring the other use case. I am sorry that there is currently no way in AIR app to recognize that another app audio is playing.

Participating Frequently
April 13, 2012

Thanks a lot for the reply!

It is very unfortunate that there is not a solution to this. It seems that building an audio/music player app via AIR for iOS is not really feasable due to this limitation.

I would think the use case would be larger for my case because typically, when you launch a game on your iPhone, the background audio application stops the music. Or maybe just have a listener that could detect if another app was launched at least, so you could stop your AIR audio by choice. That would be great.

Do you see this as grounds for an audio app being rejected? If the background audio does not stop unless you physically go back into the app and pause it?

Thanks.

Adobe Employee
April 13, 2012

Not all games stop the background music at launch. Though some of them might do them. I understand your requirements. You might want to add a feature request for this at http://ideas.adobe.com/ct/ct_list.bix?c=9D564F43-979A-4E35-AA21-85A61%20B6AB8DE.

I have not tried this but you can also trying buidling a native extension to detect any background audio being played or avoid mixing of AIR app audio with others.