Change brightness in Donut

Last Updated:

  1. kaloer

    kaloer New Member

    Hi there,

    I am updating my application to Android 1.6 Donut. On Donut, I can't change the screen brightness from my application anymore. On Cupcake it works, and I do it this way:

    Code (Text):
    2. LayoutParams lp = getWindow().getAttributes();  
    3. lp.screenBrightness = 0.2f;
    4. getWindow().setAttributes(lp);
    Has this function been removed or replaced in Donut? Or do I need a permission to change it? Or does it still work for you?

    Thank you very much,


Share This Page