• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Sleep mode Android still running

Community Beginner ,
Apr 27, 2013 Apr 27, 2013

Copy link to clipboard

Copied

Dear developers, I have a small problem with a game I am developing for Android/IOS.  I am testing it out on a Samsumg Galaxy Tab II 10.1 and have the following behaviour.

When I press the power button to enter sleep mode with the app playing, after the screen goes black I can continue to hear game sounds from the tablet (even 30 seconds after pressing the power button).  When I turn it back on, it is clear that the game play has moved forward (at a lower frame rate, as the link below suggests).  Is this expected behaviour?

http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c36cfb8137124318eebc6-8000.html

My question is "What line of code do I use to detect when the screen goes black?"  When I receive this trigger I would then force the game to go into a pause mode (which I have already coded for anyways).

Thank you

TOPICS
Development

Views

681

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Apr 27, 2013 Apr 27, 2013

Hi,

Event.DEACTIVATE should help you out. Deactivate event does get dispatched when turning the screen off and locking the device.

Regards,

Nimit

Votes

Translate

Translate
Adobe Employee ,
Apr 27, 2013 Apr 27, 2013

Copy link to clipboard

Copied

Hi,

Event.DEACTIVATE should help you out. Deactivate event does get dispatched when turning the screen off and locking the device.

Regards,

Nimit

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 27, 2013 Apr 27, 2013

Copy link to clipboard

Copied

LATEST

Many thanks, it worked perfectly.

Justin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines