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?
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
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?
Check if PhoneGap provides such API.
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.
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?
I'm not aware of any other plug-ins. My guess is that there is no API to do that from the browser.
i plan on compiling to a native IOS app at some point.
If you use Appery.io -- it will be a hybrid app.
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
Sure, could be done via CSS.
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;