title: Making a click-through Activity
body: <p>I'm trying to adjust the brightness of my phone programmatically. I've got an Activity in my app which is translucent to do this, however users can't click through it to the activity/window beneath it. I kill this activity as soon as the brightness is set, however I want to do more work in this activity (such as gradual brightness adjustment) which requires some time, and I don't want the user tapping at their phone wondering why their actions aren't being registered.</p>
  
  <p>So basically, I need to either create a mock Window which will successfully allow me to adjust screen brightness without being displayed, or work out how to make an Activity click-through. I'm not sure how to do either.</p>
  
  <p>BTW, this is the code making the brightness adjustments in the Activity:</p>
  
  <pre><code>android.provider.Settings.System.putInt(getContentResolver(),
              android.provider.Settings.System.SCREEN_BRIGHTNESS, Math.round(SOME_BRIGHTNESS * 255f));
  
  Window window = getWindow(); 
  window.getAttributes().screenBrightness = SOME_BRIGHTNESS;
  window.setAttributes(window.getAttributes());
  
  float sysBrightPer = getSystemBrightness(getApplicationContext());   
  
  new Thread() {
      public void run() {
           try {
               sleep(BRIGHT_TIMEOUT);
           } catch (InterruptedException e) {
               e.printStackTrace();
           }
           finish();
      }
  }.start();  
  </code></pre>
  
  <p>Any advice?</p>
  
  <p>P.S. I found this app on the market. I wonder if the way this has been achieved would help me? <a href="https://market.android.com/details?id=com.haxor" rel="noreferrer">https://market.android.com/details?id=com.haxor</a> </p>