Morning!
Personally I use the stylus quite a lot, and it always bothered me that the screen didn't turn off when I put the stylus back in the tablet. Thus, I figured out how to make that happen with Tasker.
Below you'll find a basic description of how to achieve this on your own, and also a link to my tasker profile.
Note that this requires root(Run Shell), and that Tasker is set as a Device Administrator(Screen Off).
This profile detects when the stylus status changes.
Profile: Event -> System -> Intent Received
Action: com.nvidia.intent.action.PEN_CHANGED
This task determines if the stylus is removed or inserted, and acts accordingly.
Task: Code -> Run Shell
Command: settings get system stylus_removal_status
Use Root: Checked
Store Output In: %STYLUS
If the stylus is removed, this task sets %STYLUS to 1. And if not, 0.
Task: Display -> System Lock
If: %STYLUS ~(matches) 0
Obviously there are a lot more things you can do, incl. grouping settings etc. within the Task -> If function, but I figured I'd just explain the basics here.
My profile linked below reacts to when the stylus is inserted assuming I'm not watching Netflix, and gives me 2 seconds to abort the Screen Off countdown with a scene popup button if I want to. It also contains a "safeguard" to avoid the screen turning off as soon as you wake it, which would occur if you reinserted the stylus and then turned off the screen manually by habit.
As I'm a new user, you'll have to copypaste the link, hopefully that's not too annoying.
http://ift.tt/255y7um
Personally I use the stylus quite a lot, and it always bothered me that the screen didn't turn off when I put the stylus back in the tablet. Thus, I figured out how to make that happen with Tasker.
Below you'll find a basic description of how to achieve this on your own, and also a link to my tasker profile.
Note that this requires root(Run Shell), and that Tasker is set as a Device Administrator(Screen Off).
This profile detects when the stylus status changes.
Profile: Event -> System -> Intent Received
Action: com.nvidia.intent.action.PEN_CHANGED
This task determines if the stylus is removed or inserted, and acts accordingly.
Task: Code -> Run Shell
Command: settings get system stylus_removal_status
Use Root: Checked
Store Output In: %STYLUS
If the stylus is removed, this task sets %STYLUS to 1. And if not, 0.
Task: Display -> System Lock
If: %STYLUS ~(matches) 0
Obviously there are a lot more things you can do, incl. grouping settings etc. within the Task -> If function, but I figured I'd just explain the basics here.
My profile linked below reacts to when the stylus is inserted assuming I'm not watching Netflix, and gives me 2 seconds to abort the Screen Off countdown with a scene popup button if I want to. It also contains a "safeguard" to avoid the screen turning off as soon as you wake it, which would occur if you reinserted the stylus and then turned off the screen manually by habit.
As I'm a new user, you'll have to copypaste the link, hopefully that's not too annoying.
http://ift.tt/255y7um
from xda-developers http://ift.tt/1shW28f
via IFTTT