Questions tagged [screen-brightness]
141 questions
6
votes
2 answers
UIScreen Brightness Property
At the moment I'm trying to create an application to adjust the device's brightness. In iOS5, there is the new brightness property for mainScreen that allows you to set the screen brightness. I'm using the following code:
[[UIScreen mainScreen]…

ac3xx
- 63
- 1
- 5
6
votes
4 answers
Setting screenBrightness attribute to 0.0f in Android 4.2.2 no longer turns screen off?
Here's the relevant code:
WindowManager.LayoutParams windowParams = getWindow().getAttributes();
windowParams.flags |= LayoutParams.FLAG_KEEP_SCREEN_ON;
windowParams.screenBrightness = 0.0f;
getWindow().setAttributes(windowParams);
I also tried…

tslocum
- 3,422
- 5
- 30
- 33
6
votes
0 answers
Prevent iPhone auto-lock, but permit screen dimming
I have an application which works in a hands busy environment so the user rarely touches the device. Of course, the phone goes into auto-lock and my app stops working. I used this code:
[[UIApplication sharedApplication]…

Paul Cezanne
- 8,629
- 7
- 59
- 90
5
votes
2 answers
How to detect if screen brightness has changed in Android?
I have searched extensively and couldn't find a similar question.
I would like to know if there is any way to detect when the screen brightness of a mobile device has been changed.
I have already tried to store the old value when the app starts and…

Irfan S
- 267
- 5
- 14
5
votes
4 answers
Setting color brightness on Linux/Xorg
Is there any command (or API) to set X.Org/Linux color brightness?
In other words, I need something as handy as the xgamma command but for changing RGB brightness real-time.
Is this possibile?

Gian Paolo Ghilardi
- 1,065
- 13
- 20
5
votes
0 answers
Adjust Brightness of External Display Mac Programmatically
Does anyone know of a way to change the brightness of an external display connected to a mac through Objective-C? (Like an Apple Thunderbolt Display or LED Cinema Display?) I have seen answers for adjusting the primary screen's brightness, but not a…

Jake Chasan
- 6,290
- 9
- 44
- 90
4
votes
1 answer
Change Device Brightness using flutter app
I need to change the brightness of the device using the flutter app. I searched the internet and most of the answers suggested using screen package. After adding it to the project and running the app the logs said that this particular package uses…

Atharva Dhamale
- 151
- 1
- 2
- 9
4
votes
1 answer
How to give permission for changing screen brightness in Marshmallow
I am using following code to increase brightness. It is properly working in devices which are below Marshmallow. It is crashing in Marshmallow, and I did not find anything to give dynamic permission for Write-settings. Anybody has idea please help…

Aju
- 4,597
- 7
- 35
- 58
4
votes
2 answers
Android: Set automatic brightness adaptation speed
I would like to modify, how fast the screen brightness is changed by Android, if Automatic brightness is enabled in the Android Settings.
The issue is that it is quite annoying if screen brightness changes rapidly, because if the light sensor is…

Dennis Guse
- 883
- 10
- 34
4
votes
5 answers
How to turn off Auto-Brightness programmatically?
I was wondering if there is a method to toggle the "Auto-Brightness" option to the OFF position on iOS devices and if so, what is it?

David
- 583
- 1
- 10
- 27
4
votes
1 answer
Changing BlackBerry-10 screen brightness from Android app
In my Android application I am using the following code to change screen brightness
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.screenBrightness = someValue;
getWindow().setAttributes(lp);
On Android devices it works fine, but…

Bojan Kogoj
- 5,321
- 3
- 35
- 57
4
votes
2 answers
Set Android screen brightness
I am trying to set the screen brightness in android completely dark. The first time it works perfectly but after the brightness is 0 but I can see the screen. How make the android screen completely dark?
This is my code:
WindowManager.LayoutParams…

jcesarms15
- 181
- 1
- 3
- 10
4
votes
3 answers
How can I change the Brightness of the screen in BroadcastReceiver?
I want to change the Brightness, I can use this method:
public static void SetBright(int brightness, Context context) {
if (isAutoBrightness(context)) {
stopAutoBrightness(context);
}
WindowManager.LayoutParams lp = ((Activity)…

smileVann
- 554
- 1
- 6
- 15
3
votes
0 answers
detect pixel brightness changes in camera preview of Android
Anyone have idea how we can measure the light intensity/brightness of pixels in camera preview?
Foe example: some objects able to absorb light resulting in lower average brightness value.
Hopefully, someone want to share some good…

dts
- 31
- 1
3
votes
3 answers
How do you set brightness of screen in Android?
I want a dialog that adjusts brightness of the screen using SeekBar.
How to display custom dialog with SeekBar that adjusts brightness of screen?

Vaibhav Jani
- 12,428
- 10
- 61
- 73