Set display brightness (%BRIGHT) not working for camera app

480 views
Skip to first unread message

Michael

unread,
Oct 30, 2017, 10:08:37 AM10/30/17
to Tasker
Hi all,

I would like to turn off auto brightness and set display brightness to max value (255) when I open the gallery or camera app. Simple task, which is working fine for the gallery app. But when I open the camera app, the brightness does not change. However, it does change to max when I drop down the Android menu from top or when I open the camera menu. So there has to be some kind of trigger action to be taken.

As far as I could read in the manual, Tasker does something like this (probably triggering a keyboard or something in the background), although this is probably not enough in my case. Any ideas for a workaround or any other solution?

Cheers,
Michael

Jimmy Jimmy

unread,
Nov 1, 2017, 10:12:21 AM11/1/17
to Tasker
My guess is the camera app constantly adjusts the screen brightness to show you the correct exposure. And therefore, even if you successfully changes it to MAX, the app will probably change it back down right away, giving you the impression that nothing gets changed.

Michael

unread,
Nov 1, 2017, 11:30:29 AM11/1/17
to Tasker
Hi Jimmy, my impression is another. If I change the brightness manually to max, it stays there. I am also able to manually change the brightness while the app is running. So the camera app doesn't seem to adjust brightness by itself. On a low brightness level you have a rather dark screen which is not useful to take a picture. Therefore, the camera app seems not to have any kind of exposure correction.

Jimmy Jimmy

unread,
Nov 2, 2017, 9:37:26 PM11/2/17
to Tasker
I see. I tried it on mine. I am able to change the brightness but then immediately after, the camera app adjusts the brightness to what it was before.

If that is the case, probably the app triggering is not working. How are you triggering it? App context? %WIN?

Rich D

unread,
Nov 2, 2017, 10:11:48 PM11/2/17
to Tasker Google Groups Post
Check the run log to see if the profile is going  active. 

Michael

unread,
Nov 3, 2017, 4:25:08 AM11/3/17
to Tasker
In my case the brightness gets to max value for maybe 0.1 seconds when i close the camera app, and immediately switches back to the old value.

I tried it with both, app context and %WIN. For the gallery app, both are working fine. Here are the logs.

Using %WIN:
20171103 09.07.23 P Active ID4 Variable Value %WIN ~ Camera | %WIN ~ Gallery
20171103 09.07.23 E Start ID0:0.0 TaskService
20171103 09.07.23 T Running ID10 Set brightness to max
20171103 09.07.24 A OK ID10.1 Set brightness to max.Auto Brightness
20171103 09.07.24 A OK ID10.2 Set brightness to max.Display Brightness
20171103 09.07.24 T ExitOK ID10 Set brightness to max
20171103 09.07.24 E Stop ID0:0.0 TaskService
20171103 09.07.26 P Inactive ID4 Variable Value %WIN ~ Camera | %WIN ~ Gallery
20171103 09.07.26 E Start ID0:0.0 TaskService
20171103 09.07.26 T Running ID-73 System
20171103 09.07.26 A OK ID-73.1 Anon.Display Brightness
20171103 09.07.26 A OK ID-73.2 Anon.Auto Brightness
20171103 09.07.26 T ExitOK ID-73 System
20171103 09.07.26 E Stop ID0:0.0 TaskService



Using app context:
20171103 09.09.53 P Active ID9 Camera or Gallery
20171103 09.09.53 E Start ID0:0.0 TaskService
20171103 09.09.53 T Running ID10 Set brightness to max
20171103 09.09.53 A OK ID10.1 Set brightness to max.Auto Brightness
20171103 09.09.53 A OK ID10.2 Set brightness to max.Display Brightness
20171103 09.09.53 T ExitOK ID10 Set brightness to max
20171103 09.09.53 E Stop ID0:0.0 TaskService
20171103 09.09.55 P Inactive ID9 Camera or Gallery
20171103 09.09.55 E Start ID0:0.0 TaskService
20171103 09.09.55 T Running ID-74 System
20171103 09.09.55 A OK ID-74.1 Anon.Display Brightness
20171103 09.09.55 A OK ID-74.2 Anon.Auto Brightness
20171103 09.09.55 T ExitOK ID-74 System
20171103 09.09.55 E Stop ID0:0.0 TaskService

Anything else I could check? My gut feel is that the updated %BRIGHT variable is not considered by Android. As soon as I do something not-camera related while the app is opened, like opening the camera menu or pulling down the Android menu, the new brightness level is activated.

Rich D

unread,
Nov 3, 2017, 5:44:18 AM11/3/17
to Tasker Google Groups Post

In my case the brightness gets to max value for maybe 0.1 seconds when i close the camera app, and immediately switches back to the old value.

I tried it with both, app context and %WIN. For the gallery app, both are working fine. Here are the logs.

The log shows the issue








Using %WIN:
20171103 09.07.23 P Active ID4 Variable Value %WIN ~ Camera | %WIN ~ Gallery


Profile goes active



20171103 09.07.23 E Start ID0:0.0 TaskService
20171103 09.07.23 T Running ID10 Set brightness to max
20171103 09.07.24 A OK ID10.1 Set brightness to max.Auto Brightness
20171103 09.07.24 A OK ID10.2 Set brightness to max.Display Brightness
20171103 09.07.24 T ExitOK ID10 Set brightness to max
20171103 09.07.24 E Stop ID0:0.0 TaskService




20171103 09.07.26 P Inactive ID4 Variable Value %WIN ~ Camera | %WIN ~ Gallery


2 seconds later profile went inactive


20171103 09.07.26 E Start ID0:0.0 TaskService
20171103 09.07.26 T Running ID-73 System
20171103 09.07.26 A OK ID-73.1 Anon.Display Brightness
20171103 09.07.26 A OK ID-73.2 Anon.Auto Brightness
20171103 09.07.26 T ExitOK ID-73 System
20171103 09.07.26 E Stop ID0:0.0 TaskService


This is Tasker restoring the display settings.



I would make a test profile that triggers on ' window changed'  and flash %WIN. This will  show you what %win value the camera app is changing to after it opens. 

Michael

unread,
Nov 3, 2017, 9:04:22 AM11/3/17
to Tasker
Sorry, my bad. I closed the camera app after two seconds :) However, I also checked how %WIN behaves. It is like that:
 - I open the camera app: %WIN = "Camera"
 - Do nothing: still %WIN = "Camera"
 - Open camera menu (which does change brigthness to max): %WIN = "Camera settings"
 - Close camera menu: %WIN = "Camera"
 - Pull down Android menu (which does change brightness to max): %WIN = "Tasker"
 - Push up Android menu: %WIN = "Camera"

So, it seems to be the camera app that does prevent changing the brightness. Right? One solution would be to automatically open the camera settings and close it quickly afterwards. But that is not really nice. Anything I could do in the background?

Rich D

unread,
Nov 3, 2017, 7:14:34 PM11/3/17
to Tasker Google Groups Post


Sorry, my bad. I closed the camera app after two seconds

So, to confirm you checked the run log and the profile will stay active as long as the camera app is open?






So, it seems to be the camera app that does prevent changing the brightness.

I have seen this with other apps. They will usually only change the brightness once just after opening. So you can  try using a wait action before you change the brightness.




Ida Einjaw

unread,
Nov 15, 2017, 8:14:03 AM11/15/17
to Tasker
 
I confirm this issue. using Android N 7.0NRD90M on Xiaomi phone MI5s plus running on MIUI 9.

when i open my camera app, the brightness don't change, I have to pull down the notification then push it up again so the camera app goes out of focus and back to front then the brightness will be max.

But when i try to edit the photo (built in function of the camera app) the screen dims again, and this time the notification trick doesn't work.

This also happens with Instagram app. The app starts with max brightness, but when i click comment the screen dims. then iIhave to do the notification trick again.

I turned off power saving but that's not the issue.

Michael

unread,
Nov 15, 2017, 9:25:39 AM11/15/17
to Tasker
Sorry for the delayed reply. I did check the run log and can confirm that the profile stays active. I also tried to add several wait actions before and after everything without any success.

Idas post is interesting, because this is exactly the same situation and I also have a Xiaomi phone (Mi 6) with MIUI 9. So this could be MIUI-related.

I installed another camera app, where the Tasker profile works as expected. So it's definately related to the Xiaomi camer app. (btw, I am wondering why they don't have this functionality in the app, anyway. Xiaomi is known to adopt all great things from others quickly ;))

John W.

unread,
Nov 15, 2017, 8:14:55 PM11/15/17
to Tasker
Rather than using %WIN, try using the app running state. Also, on Nougat it is necessary to turn off auto brightness before setting the brightness. Thereafter, turn off the profile's restore settings option.
Reply all
Reply to author
Forward
0 new messages