Change brightness in Donut


Last Updated:

  1. kaloer

    kaloer New Member This Topic's Starter

    Joined:
    Oct 9, 2009
    Messages:
    1
    Likes Received:
    0
    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):
    1.  
    2. LayoutParams lp = getWindow().getAttributes();  
    3. lp.screenBrightness = 0.2f;
    4. getWindow().setAttributes(lp);
    5.  
    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,
    Kaloer
     

    Advertisement

Share This Page

Loading...