Need Help: Turn screen off
Moderator: Martin
-
- Posts: 11
- Joined: 21 Jun 2013 13:15
Need Help: Turn screen off
I want to create a shortcut to turn screen off. Using the Lock Device action requires me to input Password/PIN due to my security policies, so I can't unlock using just my fingerprint like I do normally. I am using a Samsung J7 Pro
Re: Need Help: Turn screen off
Hi,
Unfortunately there's no good way to achieve this. One option is to set the screen timeout to a very short duration like 5 seconds (with action Set System Setting, category System, name screen_off_timeout, value 5000).
Maybe try to show a black overlay over the entire screen to pretend that it works faster.
On Android 9 and Automagic 1.36 (currently available in the EAP forum) you could use the function lockScreen() in action Control UI to turn the screen off without disabling the fingerprint feature.
Regards,
Martin
Unfortunately there's no good way to achieve this. One option is to set the screen timeout to a very short duration like 5 seconds (with action Set System Setting, category System, name screen_off_timeout, value 5000).
Maybe try to show a black overlay over the entire screen to pretend that it works faster.
On Android 9 and Automagic 1.36 (currently available in the EAP forum) you could use the function lockScreen() in action Control UI to turn the screen off without disabling the fingerprint feature.
Regards,
Martin
Re: Need Help: Turn screen off
If you have root, you can use execute root command
or
to emulate the power button.
Without root, you can only grant automagic write secure setting permission and use the method explained by Martin, or can be see here : viewtopic.php?f=6&t=6986
Code: Select all
input keyevent power
Code: Select all
input keyevent 26
Without root, you can only grant automagic write secure setting permission and use the method explained by Martin, or can be see here : viewtopic.php?f=6&t=6986
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.