1. Check out our companion app, Forums for Android! Download from Google Play

Change brightness in Donut

Discussion in 'Application Development' started by kaloer, Oct 9, 2009.

  1. kaloer

    kaloer New Member
    Thread Starter
    5

    Oct 9, 2009
    1
    0
    5
    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...