honoru88 / google-glass-api

Automatically exported from code.google.com/p/google-glass-api
0 stars 0 forks source link

Impossible to manage power and turn screen on/off properly in GDK #592

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
For a GDK Immersion:

- Either you use FLAG_KEEP_SCREEN_ON and the screen never sleeps, draining the 
battery down very quickly

- Or you let it sleep naturally, BUT it this case:

  1. you can NOT wake it up when an event occurs, like a new notification for instance

  2. if the user swipes left/right, she is lost, and completely OUT of the app

> What is the expected output? What do you see instead?

A. We need a simple way to force the screen on and off, as if the user was 
tapping, like
  PowerManager.turnScreenOnOff( boolean turnOn )

B. When sleeping, a swipe must STAY INSIDE the immersion

I'm using XE19.1

Original issue reported on code.google.com by eric.am...@gmail.com on 20 Aug 2014 at 2:07

GoogleCodeExporter commented 9 years ago
Last thing: in the meantime, as a workaround, I use FLAG_KEEP_SCREEN_ON with

        WindowManager.LayoutParams params = getWindow().getAttributes();
        params.screenBrightness = 0f;     // 1f; to turn on again
        getWindow().setAttributes(params);

Keep on the good work Glass Team!

Original comment by eric.am...@gmail.com on 20 Aug 2014 at 3:03