What is the proper way to dim the screen?
<p>I have seen 2 methods so far in my search, both of which I am having trouble with.</p>

<p>Method 1)</p>

<pre><code>Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 100);
</code></pre>

<p>Method 2) </p>

<pre><code>IHardwareService hardware = IHardwareService.Stub.asInterface(ServiceManager.getService("hardware"));
hardware.setScreenBacklight(.5);
</code></pre>

<p>Which of these methods is correct? Or is there another that I should be using?</p>

<p>Thanks</p>
