Creeper
New member
I have a system setting that turns off automatically every time I lock the screen or when the system setting is turned on for more than 7 hours. I need it to stay on all the time when the charger is plugged in, so I added a condition (System Setting Change Trigger) which turns it back on automatically every time it turns itself off. And I need to be able to turn it off manually when the screen is on, so I added another condition which sets a variable and prevents it from running the next ELSE IF statement which action turns it back on, since the macro I'm working on has a lot of conditions. Now, I also want the macro to be able to turn itself back on if it turned off automatically when the screen is on, the problem is it can't tell if it's triggered by a user or it turned itself off automatically so it set's the variable instead and doesn't run the next ELSE IF statement which is supposed to turn it back on.
I thought of using variables from Global/Secure/System Table so it knows that it was triggered manually through the quick setting tile or the game space while gaming but it might not work with other devices (newer models) since the variable names might be different. And I can't use the Macros Invoked Recently constraint because I have a regular interval trigger triggering every 10 secs. I though of using stopwatch but then again it would be inaccurate since I do not know if the system setting turns itself off at 7 hours or not, and I would prefer not to use a time constraint if possible so it works with all devices.
I'm currently using the following constraint to set the variable
Trigger
- System Setting Change
Actions
else if
- Power Connected
- Battery < 80%
- System Setting = 0
- Trigger Fired: System Setting Change
- Screen = ON
What constraint or condition would be best here so it doesn't set the variable when it turns off automatically and not triggered by the user so it runs the next ELSE IF statement? Sorry, I'm still noob in programming and still learning how to use MacroDroid. Thanks!
I thought of using variables from Global/Secure/System Table so it knows that it was triggered manually through the quick setting tile or the game space while gaming but it might not work with other devices (newer models) since the variable names might be different. And I can't use the Macros Invoked Recently constraint because I have a regular interval trigger triggering every 10 secs. I though of using stopwatch but then again it would be inaccurate since I do not know if the system setting turns itself off at 7 hours or not, and I would prefer not to use a time constraint if possible so it works with all devices.
I'm currently using the following constraint to set the variable
Trigger
- System Setting Change
Actions
else if
- Power Connected
- Battery < 80%
- System Setting = 0
- Trigger Fired: System Setting Change
- Screen = ON
What constraint or condition would be best here so it doesn't set the variable when it turns off automatically and not triggered by the user so it runs the next ELSE IF statement? Sorry, I'm still noob in programming and still learning how to use MacroDroid. Thanks!