Copy link to clipboard
Copied
Hi All,
In my Apache Flex app (Flex 4.16, AIR 25) running on iOS, all audio stops working if/when the user receives a phone call, or even if the phone just rings once.
If the user then leaves the app, i.e. presses the phone's home key, then returns, the problem goes away.
I'm guessing that I have to do something in response to the app's DEACTIVATE or ACTIVATE events, like this:
NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, onActivateApp);
NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, onDeactivateApp);
private function onActivateApp(event:Event):void {
// do something here
}
private function onDeactivateApp(event:Event):void {
// and/or here
}
... and I've tried calling SoundMixer.stopAll() when the app deactivates, but that doesn't help...
Thoughts?
Thanks,
Douglas
Copy link to clipboard
Copied
Hi,
I'm still stuck on this.
A bit of additional info. This is happening any time my app is 'interrupted', to use Apple's terminology. An interruption can consist of a phone call, an iPhone Clock app alarm going off, etc.
Once an interruption happens all sound stops working in my app until the user presses the iPhone Home button then returns to the app, at which point audio works again.
I'm not a native iOS programmer, but my googling suggests that in the native iOS world apps listen for an AVAudioSessionInterruptionNotification to find out when these interruptions occur. I'm not sure how useful this info is for understanding my current problem ... just saying ...
Is anyone else running into this?
Douglas
Copy link to clipboard
Copied
Update:
I've just created a minimal sample app that reproduces this problem.
I've created a bug report here: https://tracker.adobe.com/#/view/AIR-4198386
I've attached the sample app to the bug report.
Adobe - This is a fairly big problem...
Copy link to clipboard
Copied
Update: Comment in Tracker issue from Adobe - "Thanks for reporting this issue, Issue is reproducible at our end and we are investigating it".
If you're experiencing this problem, please vote for this issue.
Also, it looks as though this problem can also be triggered by playing a video. See this thread...
AIR 26 iOS 10.3.x/iOS 10.2.x Audio fail to work after playing the video
Copy link to clipboard
Copied
A comment has been added to the above-referenced Tracker issue which says that this problem has been fixed.
Thanks Adobe!
Copy link to clipboard
Copied
This issue has reappeared in AIR 33.
I've reported it with these issues:
https://tracker.adobe.com/#/view/AIR-4198886
https://github.com/Gamua/Adobe-Runtime-Support/issues/161
I'll also create a separate thread on this forum to discuss this "new" bug.