osiris1@yahoo.com
Posts: 0
Joined: Mon Jun 10, 2013 5:34 pm

Screen brightness access on device

Is there a way to adjust the screen brightness from javascript for an IOS device using the slider control? Firstly, can I even have access to the system brightness?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Screen brightness access on device

Check if PhoneGap provides such API.

osiris1@yahoo.com
Posts: 0
Joined: Mon Jun 10, 2013 5:34 pm

Screen brightness access on device

Thanks. I will get it out.

I'm still a newbie when i comes to mobile coding but a long time asp.net and javascript coder.

osiris1@yahoo.com
Posts: 0
Joined: Mon Jun 10, 2013 5:34 pm

Screen brightness access on device

could not find any commands in PhoneGap to interact with the brightness control. Other than PhoneGap, are there any other plugins I could utilize with Appery to get the job done?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Screen brightness access on device

I'm not aware of any other plug-ins. My guess is that there is no API to do that from the browser.

osiris1@yahoo.com
Posts: 0
Joined: Mon Jun 10, 2013 5:34 pm

Screen brightness access on device

i plan on compiling to a native IOS app at some point.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Screen brightness access on device

If you use Appery.io -- it will be a hybrid app.

osiris1@yahoo.com
Posts: 0
Joined: Mon Jun 10, 2013 5:34 pm

Screen brightness access on device

Is there a way to place a black overlay over the screen to simulate brightness? I've seen some other apps that try this. It seems pretty effective. The slider changes the opaqueness, thus giving the illusion of adjusting brightness

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Screen brightness access on device

Sure, could be done via CSS.

osiris1@yahoo.com
Posts: 0
Joined: Mon Jun 10, 2013 5:34 pm

Screen brightness access on device

This css works, but how do I get it to interact with the slider control?

body.fadeMe {
opacity: 0.5;
background: #000;
width: 100%;
height: 100%;
z-index: 10;
top: 0;
left: 0;
position: fixed;
}

with javascript like: document.body.style.opacity=(Appery("Brightness_Slider").val())/100;

Return to “Issues”