samedi 2 avril 2016

[GUIDE][Difficulty: Beginner]Switch phone on/off using a flipcase

Hello guys,

I was totally stunned, when I saw that there's a member lead tasker forum. I love tasker and couldn't imagine a phone without it.
As I want to spread my thoughts here are several profiles coming for you :)


Requirements
  1. Secure Setting


What does the script do?

Simple. It turns on your phone, when you open your flip case (or e.g. take it out of your pocket) and turns it off, when you're on the lockscreen and approximity sensor is cover (e.g. put it back in your pocket and/or close your flip cover).

Let's get started

Profile 1

Code:

1. State -> Approximity Sensor check reverse
2. Enter task and name it "turn display on" for example. Add the action Plug-In --> Secure Settings --> Configuration --> Wake Device.(Choose Wake Type Screen Bright; Duration 5 seconds)

Now exit the task section and add to the contexts of this profile:

- State --> Display State Off
- App --> Dialer App [your phone's dialer app]; Check reverse

Done


Profile 2

Set up a new profile

Code:

State --> Approximity Sensor
Enter a task and name it for example "display off", go to plug-ins --> Secure Settings --> Lock device You have to enable device adming and grant Secure setting Device admin privileges
Exit the task and add to the contexts of this profile

- State --> Variable value: Conditions %DISPLAYOFF ~ 1
- App --> Dialer App; Check reverse

Done


Profile 3


Code:

Event --> Display --> Display on
Add the task Variables --> Set Variables: Name %DISPLAYOFF to 1

Done


Last Profile

Code:

Event --> Display --> Display Unlocked
Add the task and name it "display unlocked" for example: Variables --> Set variable; %DISPLAYOFF to 0

Done!

So that's it. Very simple but saves you a lot of time.

Please feel free to post some imrpovement suggestions, thoughts or anything else that comes up your mind. I'd really be happy about it-

Love follow


from xda-developers http://ift.tt/1W0zbcL
via IFTTT

Aucun commentaire:

Enregistrer un commentaire