4 Replies Latest reply on Aug 31, 2017 6:00 PM by dews

    Black screen on Android when returning from sleep

    dews Level 1

      I found a few posts - most quite old - this one appeared to have resolved the issue for some:

      https://forum.starling-framework.org/topic/air-18-black-screen-after-standby-on-android#p ost-82165

       

      Nothing worked for me - I did figure out a workaround though:

       

      Add a listener in your main Context:

       

      NativeApplication.nativeApplication.addEventListener(flash.events.Event.ACTIVATE , activateHandler);

       

      In the handler - add a dummy object like a button to the stage (you can set its alpha to 0) then simply remove it after a quarter second.  The removal of the object appears to kick the display back on.  Note, if you try to remove the object too quickly, the display will stay black.