Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Screen light on android dims — Gideros Forum

Screen light on android dims

StoffeStoffe Member
edited November 2011 in Bugs and issues
Ok, this is only with the test APK, haven't tried building it for real so may be different.

My game so far is controlled only with the accelerometer, so I'm not touching the screen or any buttons while playing.

After a while the screen gets dimmer, and doesn't light up again until touching the screen. It doesn't go out completely, just dims down. Which is how it behaves at inactivity in other apps as well, so nothing strange, but not so good for a game. :) I assume it should be possible to override this somewhere in the code and thought you should know.

Comments

  • atilimatilim Maintainer
    edited November 2011
    Yes we'll add a function to enable/disable screen dimming with the next version.

    Also there is a solution. After exporting your code you can add this line
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    to the onCreate(...) function of your Activity to disable screen dimming.

    Likes: techdojo

    +1 -1 (+1 / -0 )Share on Facebook
  • Great, thanks!
  • could you please tell me how to create .apk file ...just dnno the steps cause i dnno from where to know :) i am dying to make an android application on my own :) plz help. thank you.
  • @atilim - neat hack, thanks :)
    WhiteTree Games - Home, home on the web, where the bits and bytes they do play!
    #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
  • ar2rsawseenar2rsawseen Maintainer
    @techdojo I think this feature was implemented some time ago:

    Application:setKeepAwake(keepAwake)
  • D'oh - it's the monday after a long weekend, and I forgot to look at the date, got caught out by bismoy's spam :)

    WhiteTree Games - Home, home on the web, where the bits and bytes they do play!
    #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Sign In or Register to comment.