Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Runtime Development

Reply
Regular Contributor
basitj
Posts: 98
Registered: ‎04-08-2011
My Carrier: Mobilink

Cannot change screen brightness

 

I keep using following code on Android deveices and it works fine. Cannot use this to chnage screen brightness on Playbook.

 

WindowManager.LayoutParams layoutP = getWindow().getAttributes();
                layoutP.screenBrightness = 100 / 100.0f;
                getWindow().setAttributes(layoutP);

 

Any help please?

 

 

Get Speedometer on your phone. http://www.speedometer.mobi
Please use plain text.
Developer
BojanKogoj
Posts: 43
Registered: ‎01-08-2013
My Carrier: SiMobil

Re: Cannot change screen brightness

Has anyone succeeded to make this work?

 

I am facing the same problem, using very similar code to ajust screen brightness. It works fine on Android devicess, however it does not work on Blackberry.

 

WindowManager.LayoutParams lp = getWindow().getAttributes();

lp.screenBrightness = value[screenBrightness];
getWindow().setAttributes(lp);

 

Any help would be appreciated

Please use plain text.