Search code examples
google-glassgoogle-gdk

GDK - keep screen from dimming on a live card


I have a high frequency live card published and I would like to keep the screen from dimming when the user is looking at the card.

I realize that this is a duplicate question to this one

GDK / APK for Google Glass - Keep screen from dimming

but the answer seems to no longer work. The sample projects don't stay on screen anymore either. I have also tried acquiring the wake lock without success.

Is there a way to keep the screen on?


Solution

  • The answer from the question you linked is for Immersion. When using a LiveCard, there is no way to get a wake lock as Glass is taking care of this: this is actually one of the main benefit of a LiveCard, keeping a long running application while Glass takes care of the screen.

    If you want the user to be fully immersed in your app while using it, you should go with the Immersion pattern as this will give you full control other the screen.