Change screen brightness 
<p>i am new to android. i wanted to change brightness to max on button click..but the brightness is not changing.The code is given below please have a look :-</p>

<pre><code>          int brightness=255;
        Settings.System.putInt(getContentResolver(),  
                android.provider.Settings.System.SCREEN_BRIGHTNESS, brightness); 
        WindowManager.LayoutParams lp = getWindow().getAttributes(); 
        lp.screenBrightness =brightness;
        getWindow().setAttributes(lp); 
</code></pre>

<p>apart from this i have added

 in manifest file</p>

<p>what else do i need to add...or what changes i should accomodate so that brightness change is reflected.</p>
