title: How can I brighten the screen when opening an Activity in my Glass GDK immersion application?
body: <p>I have a GDK immersion application, where the launcher <code>Activity</code> acquires a<code>SCREEN_DIM_WAKE_LOCK WakeLock</code>.  The app also has a Service which will receive chat messages and starts an <code>Intent</code> for an <code>Activity</code> to display each one.  Whenever the message <code>Activity</code> is opened, I want to brighten the screen.  However, all of the methods I have found do not seem to work.  </p>
  
  <p>For example, adding the following into <code>onResume</code> has no effect:</p>
  
  <pre><code>    Settings.System.putInt(getContentResolver(), SCREEN_BRIGHTNESS_MODE, SCREEN_BRIGHTNESS_MODE_MANUAL);
  
      WindowManager.LayoutParams lp = getWindow().getAttributes();
      lp.screenBrightness = 1.0f;
      getWindow().setAttributes(lp);
  </code></pre>
  
  <p>To better illustrate the problem, here is the sequence of events in my app:</p>
  
  <ol>
  <li>Activity A starts and acquires a SCREEN_DIM_WAKE_LOCK.  Activity A dims after a short time.</li>
  <li>Service B receives a chat message over the network and creates an Intent for Activity C</li>
  <li>Activity C opens, sets the screen brightness as shown above, but remains dimmed</li>
  </ol>
  
  <p><strong>How can I get the screen to brighten?</strong></p>