Screen brightness trigger

Cthulhu_Triune

New member
Hello!
Please add screen brightness trigger.
Now the Macrodroid has only a brightness sensor trigger, but the sensor does not working well to set up actions due to rapidly changing brightness values.
 

tanutanu

Well-known member
Hello!
Please add screen brightness trigger.
Now the Macrodroid has only a brightness sensor trigger, but the sensor does not working well to set up actions due to rapidly changing brightness values.
Write easy macro like this with TouchTask plugin. You can use a global variable to share the value with another macro.
 

Attachments

  • 1tm.getBrightnessbyTap.png
    1tm.getBrightnessbyTap.png
    87.1 KB · Views: 42

Cthulhu_Triune

New member
Write easy macro like this with TouchTask plugin. You can use a global variable to share the value with another macro.
What you gave as an example is the action taken to change the backlight.
But I need to implement a trigger based on changes of automatic backlight for actions.
 

tanutanu

Well-known member
What you gave as an example is the action taken to change the backlight.
But I need to implement a trigger based on changes of automatic backlight for actions.
Yep. It works when you change screen brightness manually. I forgot to note that;)
If you want to detect automatically as OS setting, use interval trigger like tick function to watch the brightness value change, I don't recommend though. There is no intent to let us know the current brightness level.
Once the value changes, the other trigger is fired. So you can get a trigger based brightness change.
 

Dm114

Well-known member
Yep. It works when you change screen brightness manually. I forgot to note that;)
If you want to detect automatically as OS setting, use interval trigger like tick function to watch the brightness value change, I don't recommend though. There is no intent to let us know the current brightness level.
Once the value changes, the other trigger is fired. So you can get a trigger based brightness change.
There is no need to use an Intent to get current brightness value as we have Magic text called [current_brightness]. Then it would be easy to store it in a variable but it would drain battery to check this value in a short interval of time basis.
What you gave as an example is the action taken to change the backlight.
But I need to implement a trigger based on changes of automatic backlight for actions.
But if you need not to check brightness every second or minute you could have a macro like this:
T: Every 5 or 10 minutes
A: Store [current_brightness] into a global integer variable you could call 'Brightness'

Then you can use 'Brightness value change' as a trigger in whatever macro. But, if you only have 1 macro concerned by brightness change, you'd better integrate our previous short macro into the one using this value.
 

tanutanu

Well-known member
There is no need to use an Intent to get current brightness value as we have Magic text called [current_brightness]. Then it would be easy to store it in a variable but it would drain battery to check this value in a short interval of time basis.

But if you need not to check brightness every second or minute you could have a macro like this:
T: Every 5 or 10 minutes
A: Store [current_brightness] into a global integer variable you could call 'Brightness'

Then you can use 'Brightness value change' as a trigger in whatever macro. But, if you only have 1 macro concerned by brightness change, you'd better integrate our previous short macro into the one using this value.
haha, of course I know, but @Cthulhu_Triune needs the trigger. I worried the battery drain If called every seconds as well. That's why I didn't recommend the interval loop.
However, I hadn't tested yet, so it might not be so serious because MD main thread should be checking some timer jobs every seconds and the tiny macro is not so heavy duty in the computer world even if MD has much overhead.
 
Last edited:

Jacob L

Moderator (Lawsonator)
In the red area, press the + button and find the Logcat trigger. Then press the capture button, read the dialog and press OK once you've read and understand it. You change brightness while capturing. Stop the capture and find the brightness changes in the log
 

Dm114

Well-known member
@Dm114, See my attached image before you told almost the same thing;)
Your macro is absolutely marvelous and awesome but totally incomprehensible for someone who is not familiar with coding and MD programming. Hence it's uselessly complex to solve such a simple problem!

To help people efficiently, try to be as clear and simple as possible.

Have a nice day.
 

Cthulhu_Triune

New member
Hello, guys!
Thanks for trying to help.
I solved my problem with such constraints.
 

Attachments

  • Screenshot_20210918-172018_MacroDroid.png
    Screenshot_20210918-172018_MacroDroid.png
    102.3 KB · Views: 28
Top