Wake up/hibernate w key on/off

Post your questions and help other users.

Moderator: Martin

Post Reply
bmccann101
Posts: 4
Joined: 13 Jan 2015 19:52

Wake up/hibernate w key on/off

Post by bmccann101 » 13 Oct 2018 00:02

Hello, I have a Samsung tab4 installed into a vehicle using a very decent vehicle launcher.. It will remain on indefinitely, but I'd like to :

Immediately hibernate when the key is off..




Wake up with key on, and also
Set screen time out to never w key on..


Thanks for any help.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Wake up/hibernate w key on/off

Post by Desmanto » 13 Oct 2018 06:14

I think this should be posted in the user help section instead.

Should clear up some ambiguity. Hibernate means put the screen to off (phone sleep), but still on right (only screen off). The key on means you start the car and key off is stop the car.

I assume the tab has been connected to the car charger all the time. So when the car is on, the tab is charging and when the car is off, stop charging.
Use trigger power connected and action Set Screen time out to never. Add another action to turn the screen on, and unlock the device if you set lockscreen.
At another flow, power disconnected, and action lock device. Done.
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.

fytos
Posts: 6
Joined: 19 May 2017 19:25

Re: Wake up/hibernate w key on/off

Post by fytos » 09 Aug 2019 18:45

Is there a way to hibernate the phone as you say?
There are a lot of apps that set the display to 15 seconds or 5 but I want to set it in a flow so I can turn the display off straight'way without a 5 seconds delay. I used the normal turn off but I have to put a password to turn it on again :)

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Wake up/hibernate w key on/off

Post by Desmanto » 10 Aug 2019 14:13

AFAIK, Latest android version doesn't allow you to set the display timeout lower than 5. You can set it to 1, but it still take at least 5 seconds to get the screen off.

If you need to lock immediately, just use the normal action lock device or Control UI : lockScreen() if you have Android Pie. Directly set the keyguard state to off, enable the helper flow (see next). Then at next unlock, use trigger user present in helper flow and enable the keyguard back, disable the helper flow. So the keyguard only disabled when you use action to lock device in your hibernate flow. When you turn of the screen normally, the keyguard stays locked.
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.

Post Reply