Auto display(on/off) with tasker
Create a profile to turn the screen on and off automatically when the proximity sensor
is covered and uncovered.
you need Tasker and secure setting installed
download:
tasker: https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm&hl=en
secure settings: https://play.google.com/store/apps/details?id=com.intangibleobject.securesettings.plugin&hl=en
profile #1: name=display off
state-->sensor-->proximity sensor
task for this profile: name=display off
click plus sign-->plugin-->secure settings-->edit(pencil icon)-->dev admin actions-->lock device
and tab the save icon on top.
profile #2: name=display on
state-->sensor-->proximity sensor-->check the invert box
task for this profile: name display on
click plus sign-->plugin-->secure settings-->edit(pencil icon)-->actions-->wake device
"leave screen and keyboard" as is. change duration to 5 seconds.
and tab the save icon on top
note: this will leave the screen on for 5 sec's. if you do not touch the screen in those 5 sec's it will turn off again.
note 2: you can add a wait in the task before the the screen turns in or off. But i could not make tasker wait less than 7 seconds if it is the 1st action in the task, unless i use a dummy action first.
example:
1- variable set: variable name=dummy " lower case"
set to: time
2- task-->wait--> 2 seconds
3- click plus sign-->plugin-->secure settings-->edit(pencil icon)-->dev admin actions-->lock device
and tab the save icon on top
this way tasker will wait 2 seconds before it turns the screen off. Or you can set it to whatever time you want tasker to wait. I did not use any wait time before turning the screen on because i want it to turn on right away.
is covered and uncovered.
you need Tasker and secure setting installed
download:
tasker: https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm&hl=en
secure settings: https://play.google.com/store/apps/details?id=com.intangibleobject.securesettings.plugin&hl=en
profile #1: name=display off
state-->sensor-->proximity sensor
task for this profile: name=display off
click plus sign-->plugin-->secure settings-->edit(pencil icon)-->dev admin actions-->lock device
and tab the save icon on top.
profile #2: name=display on
state-->sensor-->proximity sensor-->check the invert box
task for this profile: name display on
click plus sign-->plugin-->secure settings-->edit(pencil icon)-->actions-->wake device
"leave screen and keyboard" as is. change duration to 5 seconds.
and tab the save icon on top
note: this will leave the screen on for 5 sec's. if you do not touch the screen in those 5 sec's it will turn off again.
note 2: you can add a wait in the task before the the screen turns in or off. But i could not make tasker wait less than 7 seconds if it is the 1st action in the task, unless i use a dummy action first.
example:
1- variable set: variable name=dummy " lower case"
set to: time
2- task-->wait--> 2 seconds
3- click plus sign-->plugin-->secure settings-->edit(pencil icon)-->dev admin actions-->lock device
and tab the save icon on top
this way tasker will wait 2 seconds before it turns the screen off. Or you can set it to whatever time you want tasker to wait. I did not use any wait time before turning the screen on because i want it to turn on right away.