Skip to main content
Known Participant
November 15, 2012
Question

Prevent android app audio playing when minimised

  • November 15, 2012
  • 1 reply
  • 2039 views

My android app has some looping background audio. When I minimise the app by selecting the "home" button on my Nexus 7 - the app disappears but I can still hear the audio playing. I assume the app must be still active in the background. The same app on the iPad doesn't exhibit this behaviour so I guess something different in how Android deals with apps that are not in the foreground.

Would appreciate advice on best way to prevent this audio playing. Ideally I don't want to completely shut down the app when minimised.

All advice much appreciated

My app was compiled with Flash CS6 and Air 3.5.

This topic has been closed for replies.

1 reply

Inspiring
November 16, 2012

I listen for Event.DEACTIVATE

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/Event.html#DEACTIVATE

When the app is minimized and that event fires, I just stop or mute the audio the same way i normally would

P StevenAuthor
Known Participant
November 16, 2012

Ah thank you boat5 - I hadn't realised this was necessary. I assume I will be able to start the audio again in a similar manner when it gains focus again.

Many thanks