• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Change brightness in Donut

kaloer

Lurker
Oct 9, 2009
1
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:
LayoutParams lp = getWindow().getAttributes();  
lp.screenBrightness = 0.2f; 
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,
Kaloer
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones