API to control screen brightness
I would like to develop a bedside alarm clock app where the user can control the brightness by touch - so the app can run with the screen off unless the user is touching the screen, or the user can pinch to make the display lighter or darker. All I am able to control at the moment is the contrast of the display (by playing with the colours and alpha levels of the rendered graphics).
Don't put restrictions features..... Screen brightness control on mobile devices is mandatory....
Jan Kučera commented
@Josh You can request away mode that will prevent the device from powering down.
Josh Usovsky commented
@Clint Rutkas I'm using cheapo (Nuvision) tablets as wall-mounted front ends for the home automation system I am writing. The tablets are permanently plugged in to power via their USB charging ports, but over the course of a couple days, even with their screens on the lowest brightness, the tablets eventually run out of power and turn off. I've attempted to turn the screen completely off using PostMessage(hWnd.ToInt32(), WM_SYSCOMMAND, SC_MONITORPOWER, 2), but there's nothing but sorrow down that road. That ends up requiring pressing the power button to turn the display back on, and in fact, I think it almost appears to completely power down the device. Ultimately, I want to be able to turn the screen off until the device receives touch input or code turns the screen back on.
Hermit Dave commented
For MailOnline, we would love to have ability not only set custom theme but to also control font + styling + sizes, line spacing, and screen brightness.
In addition there are multitudes of app that could use these API. These could be exposed for only control only within application. The application can request it and like ApplicationView the system will do what it can.
ApplicationDisplay appDisplay = ApplicationDisplay.GetForCurrentView();
The API would be applied only if application was full screen. If application exits or is collapsed, the system reverts to default values.
Matt Tycholaz commented
@Clint Rutkas You should be also be able to turn the screen off too. I'm developing an app on Windows 10 mobile, and I allow users to change the audio rendering endpoint to the internal speaker. The problem I'm having is when I put the phone to my ear, the screen is still on, and sometimes touch events are fired off. If I could turn off the screen, then I could stop the touch events from firing, and save battery while a user is listening.
Matt Tycholaz commented
It's 2017, and this API is still needed. I'm just posting to breath life back into this.
Martin Skargeth commented
So much need!
Jan Wissel commented
We really need this!
I am doing a Home Automation control screen with an RPI3 and the pi display.
When the room is dark, the display needs to be dimmed, otherwise it lights up all the room, which is annoying -plus, you cant really read the thing cause it just dazzles you.
I already set the background to black and the foreground to grey at night, but it still sucks - and is just feeling awkward, when the linux guys can just dim the screen like it should work..
so yes guys, please fix this!
@josh, can you explain what your app does and how you'd verify this scenario? There are power APIs.
What is the target device?
@Josh Usovsky, can you tell us more about your app?
Josh Usovsky commented
Yes, I need this as well in order to save battery for an always-on app that runs on tablets that use more power than they can use for recharging via USB.
Matthew Bonanno commented
It would be awesome if this idea was expanded further by adding the hooks f.lux needs to make a UWP!!!
I have fresh new w10 phone, and i am allways with brightness=0% (because of annoing battery level).....
I do not use adjust-brightness (because of annoing battery level)....
It is good for 70-90% situations, but on sunshine it is difficult....
I need to switch brightness=25/50/75% or adjust-brightness=ON on lock screen(PIN), but how can i do this ?
On Nokia.symbian through ...KEY-SHORTCUT (Press some key for X seconds)
On w10mobile may be.... VOLUME UP+DOWN together, or other idea...?
phones with QWERTY /F-KEYS...still missing, WHYYYYYYYYYYY ?
vivek singh commented
please MS do it yes from me
My vote is "yes"!
yes, we want.
Much needed yeah!!!
I do like the way whatsapp has incorporated settings into its app and that might be a good platform to start on. I dont see the harm in adding control of brightness to the app.
Scott Lovegrove commented
Would be good if this API was restricted to being an app setting, so if you leave the app, the system setting is reapplied.