Ok. I've re-installed Tasker after a year or so and set up a few simple profiles, but I can't get a couple of very simple tasks to work.
1. Keep screen on for specific apps:
Profile > Launch App > iPlayer, Youtube or Ghostery Browser
Task > Display Timeout > 23 Hrs
Exit Task > Display Timeout > 30 secs.
Launch the apps, but screen off after 30 secs. (I've tried deleting the Exit Task, makes no difference).
2. GPS on
Profile > Launch App > Maps
Task > Location > GPS > On
Exit Task > Location > GPS > Off
GPS stays off.
Other tasks seem ok (Auto rotate for certain apps, Silent at night, etc).
I've got an LG G3 (D855), running 5.0 and rooted. I've given Tasker admin privileges and installed Autotools.
Any ideas?
Better if you post the DESCRIPTION of the profile instead of describing it.
Long press on the profile name -> 3-dot menu -> export -> export "DESCRIPTION" to clipboard (not XML). Then paste here.
Beginner mode must be off and the profile must be named. If you didn't name it, there will be a default name created from the first context. You need to actually name the profile by long pressing and tapping the "A" at the top.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Thanks ktmom,
Ok here it is:
Profile: Screen On (20)
Application: BBC iPlayer or Ghostery
Enter: Screen On (21)
A1: Display Timeout [ Secs:0 Mins:0 Hours:23 ]
You edited the context and added "or Ghostery", right? If, not, how did you create the OR between two apps?
Add a flash alert action at the *end* of the Screen On task. Set the text to "Screen on %DTOUT". The flash alert should return "Screen on 82800" for a 23 hour timeout.
What device, ROM?
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Thanks ktmom,
No, that's just from export. Just did it again to check, it says 'Application: BBC iPlayer or Ghostery'
I'll try that. Not sure how to add a flash alert action. Is it a Variable?
From my OP: "I've got an LG G3 (D855), running 5.0 and rooted. I've given Tasker admin privileges and installed Autotools. "
Thanks for your help.
Munky99 said:
Thanks ktmom,
No, that's just from export. Just did it again to check, it says 'Application: BBC iPlayer or Ghostery'
I'll try that. Not sure how to add a flash alert action. Is it a Variable?
From my OP: "I've got an LG G3 (D855), running 5.0 and rooted. I've given Tasker admin privileges and installed Autotools. "
Thanks for your help.
Click to expand...
Click to collapse
A flash action is contained under the alerts. Your can filter in the action list, just type in "flash".
Sorry, I overlooked the device in the OP. I think the LG phones have a problem setting the display time out. Try setting it to a standard number your device recognizes, such as 10 or 15 minutes.
If that works, but not the 23 hours your trying, then there may be a way to get around the problem using a script (requires root).
Edit:
Here is an example of using code -> Run Shell with root to shame the display timeout at a system level. This may or may not work on your OS.
Profile: Screen On
Application: <whatever app(s) should trigger profile>
Enter: Screen On
A1: Run Shell [
Command:settings get system screen_off_timeout
Timeout (Seconds): 0
Use Root: On
Store Output In:%DisplayTimeOut
Store Errors In:
Store Result In:
]
A2: Run Shell [
Command:settings put system screen_off_timeout 6000000
Timeout (Seconds): 0
Use Root: On
Store Output In:%DisplayTimeOut2
Store Errors In:
Store Result In:
]
A3: Flash [
Text:Screen on %DTOUT
DisplayTimeOut %DisplayTimeOut
Long: On
]
Exit: Screen Off
A1: Run Shell [
Command:settings put system screen_off_timeout %DisplayTimeOut
Timeout (Seconds): 0
Use Root: On
Store Output In:%DisplayTimeOut2
Store Errors In:
Store Result In:
]
A2: Flash [
Text:Screen on %DTOUT
DisplayTimeOut %DisplayTimeOut
Long: On
]
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Related
Hi guys, this is my first guide on XDA
Any suggestions for improving are welcome
I have always been worried about losing my phone, so i made a "Find my phone if all else fails" backup plan (because Googles Device Manager isn't that accurate if you don't have WiFi/data)
What you need:
Tasker (well duh?) [PAID]
Secure settings plugin
Toggle data 5.0 [PAID, but rumor has it there is a free version for XDA members somewhere] (Not needed on Samsung devices, can uses taskers built in data toggle?) I am only using this as the secure settings and taskers inbuilt data toggle did not work for me. They might work for you!
...and Root (Recommended)
You are out with some mates, and you reach into your pocket where your phone should be, and you find....nothing! You don't panic though, as you can just borrow your friends phone, to text yours to find it.
First line of defense
This is a simple, no data, no wifi way of getting an accurate location for your phone.
1. New > Event > Phone > Received text
a. TYPE: Any
SENDER: (Leave blank)
CONTENT: Lost phone (you can change it for your own phrase, and it is case sensitive!)
<Back (top left)
In the popup, select "New Task +", and call it "Lost Reply"
2. Add action > Phone > Send SMS
a. NUMBER: %SMSRF
MESSAGE: Please wait up to two minutes for the location...
<Back (top left again)
b. Add action > Plugin > Secure settings > Configuration (Tap on the pencil) > System+ Actions > GPS > select "On"> Tap the save icon >
<Back (Top Left)
c. Add action > Task > Wait > 5 Seconds >
<Back (you know where)
d. Add action > Location > Get Location > SOURCE: GPS, TIMEOUT (Seconds): 50 [higher the better, more accurate GPS fix] >
<Back
e. Add action > Phone > Send SMS > NUMBER: %SMSRF
MESSAGE:
Im lost! My batt is at: %BATT
Location: %LOC
Accuracy: %LOCACC
GPS stat: %GPS
<Back
f. Add action > Task > Wait > 15 Seconds
<Back
g. Add action > Plugin > Secure settings > Configuration (Tap on the pencil) > System+ Actions > GPS > select "Off"> Tap the save icon >
<Back (Top Left)
Done! you can now track your phone via Text!
Need more tracking ability?
How about you enable the data remotely via text? Then you can use Android device Manager or an installed anti theft app to track your phone!
[You can try kenboyles72 method posted below for enabling/disabling data too]
Data on:
1. New > Event > Phone > Received text
a. TYPE: Any
SENDER: (Leave blank)
CONTENT: Enable Data (you can change it for your own phrase, and it is case sensitive!)
<Back
In the popup, select "New Task +", and call it "Data on Reply"
2.
a. Add action > Plugin > Toggle data 5.0 > tap on "Configuration" > select "Switch on"
<Back
b. Add action > Phone > Send SMS >
NUMBER: %SMSRF
MESSAGE: Data is now ENABLED
<Back
Data Off
1. New > Event > Phone > Received text
a. TYPE: Any
SENDER: (Leave blank)
CONTENT: Disable Data (you can change it for your own phrase, and it is case sensitive!)
<Back
In the popup, select "New Task +", and call it "Data off Reply"
2.
a. Add action > Plugin > Toggle data 5.0 > tap on "Configuration" > select "Switch off"
<Back
b. Add action > Phone > Send SMS >
NUMBER: %SMSRF
MESSAGE: Data is now DISABLED
<Back
Nice guide and works great as you have written above. Just a note, you can enable/disable data via run shell in tasker without any third party app/plugin. I have a profile that toggles data when I'm on wifi.
Turn data off
Run Shell Command:
su
setenforce permissive;
svc data disable;
Check the use root box
Turn data on
Run Shell Command:
su
setenforce permissive;
svc data enable;
Check the use root box
Not sure if this will work on all phones, but works great on my Oneplus One
kenboyles72 said:
Nice guide. just a note, you can enable/disable data via run shell in tasker without any third party app/plugin. I have a profile that toggles data when I'm on wifi.
Turn data off
Run Shell Command:
su
setenforce permissive;
svc data disable;
Check the use root box
Turn data on
Run Shell Command:
su
setenforce permissive;
svc data enable;
Check the use root box
Not sure if this will work on all phones, but works great on my Oneplus One
Click to expand...
Click to collapse
Oooh ok thanks! I didn't know that [emoji2] i could have saved 4 bucks haha
Sent from my HTC One M9 using XDA-Developers mobile app
cjkbarnett said:
Oooh ok thanks! I didn't know that [emoji2] i could have saved 4 bucks haha
Sent from my HTC One M9 using XDA-Developers mobile app
Click to expand...
Click to collapse
Found that command in one of the guides here. I have gone through just about every thread and have greatly expanded my knowledge in tasker. I have bookmarked a lot of 'em, plus I have everything typed out just in case
Edit:
Here's another tip for your script that I just added to mine. In your send text command with just %LOC, you will just get the long and lat numbers and is hard to copy just that text in some message apps. Now if you add
Code:
I’m at http://maps.google.com/maps?z=12&t=m&q=loc:%LOC
this will give a link to google maps with current location and would be easier to use.
Hello all XDA users! I created a project that automatically switches the clock format on your WM watchface whenever you switch between the formats on your phone via system settings.
===Prerequisites===
First and foremost, you need to install the Tasker (I used this on full version but it may work on the trial version) and have Allow External Access enabled, you can do this by doing the following:
Press the 3 dot menu
Click Preferences
Swipe over to Misc and find Allow External Access, then tap it to enable it
Done!
Then you need AutoTools by joaomgcd, you can download it here
Have USB Debugging enabled for ADB configuration for AutoTools
To Enable this, do the following:
Go to Settings
Go to About Device
Find your build number and click it several times until the phone says that you have enabled developer mode
Go into Developer Settings
Click on the tab that sets USB Debugging to enable it
Done!
Have ADB Drivers/Fastbook installed, here are two places that you can download these from but you don't have to download from these: Skipsoft, XDA
Have Installed WatchMaker Premium or Free Version
===About this Project===
What this project does is check if you have booted up your device and if so, it records the current time format your clock is set to. Then it checks if you have changed the format of your clock via broadcast intent, then it compares the previously recorded setting and the new setting, if they do not match, the task sends the new setting to WatchMaker and it changes the format on the watch to the new setting.
===Building the Project===
The first and foremost you MUST do is ensure that you have downloaded and got everything from the prerequisites. Once you have everything, follow the instructions for enabling access to system settings for AutoTools (you HAVE to do this in order for the profile to function correctly, as it needs to read the configuration for the 24hr format switch in the system settings, the profile will ONLY be looking at this setting). Once you have done these, you can move on to making the actual profiles
For the first profile, it will record the current clock format soon after the device boots up
So we must create an Event profile that will trigger soon after the phone finishes booting on, leave Invert unchecked
Now here's what you need for the actions:
Plugins -> AutoTools -> Secure Settings. Then click custom settings and do the following:
Setting Type: System
Name: time_12_24
Input Type: String
Leave Value Blank
Read Setting: Enabled
Variables -> Variable Set. Set %TIME_FORMAT to %time_12_24 (its the variable that AutoTools passes for the custom setting). This records the value we got from AutoTools and stores it in a global variable for us to use later on
OPTIONAL: Alert -> Notify Vibrate. For Title: put 'Logged Format Time' without quotes, and for text, added 'Log Format: %TIME_FORMAT' without quotes. This will notify that you have logged the format and will tell what the format is.
OPTIONAL: Task -> Wait. Set it for 10 seconds. This will make Tasker wait 10 seconds to move on to the next action
OPTIONAL: Alert -> Notify Cancel. For Title: put 'Logged Format Time' without quotes, and have Warn Not Exist checked. This will dismiss that notification we just sent 10 seconds ago
For the second profile, it will do the actual process of sending the variables to the WatchMaker App
We're going to create a Intent Received profile that will check if the specified broadcast intent has been received. For action, put 'android.intent.action.TIME_SET' without quotes. This will check if the TIME_SET intent has been received
Now here's what you need for the actions:
Task -> If. Set the condition to %TIME_FORMAT is SET. This will check if the global variable we defined in the first profile has something in it (this is for in case that you didn't boot up your device to store the value to the global variable so Tasker does not return an error since there is no value in the variable)
Plugin -> AutoTools -> Secure Settings. Like the same as like time, we're going to be finding that system variable, time_12_24. Just do the exact same steps as listed for the last time we defined this action
Task -> If. This time, set the condition to %time_12_24 does not match (!~) to %TIME_FORMAT. This will make Tasker check if the system format variable we just grabbed in the previous action DOES NOT match the previously recorded variable from our first profile. This is necessary to check because if you have automatic update clock enabled in system settings, that TIME_SET intent gets called whenever the phone updates to the network time, and because of this, we do not want Tasker constantly nagging us that the format has been update, despite that the format is the same as before.
Plugin -> WatchMaker -> WM Send Variable. Set the variable to send to %time_12_24, which is the new format that we switched to and just checked for.
OPTIONAL: Alert -> Notify Vibrate. For Title: put 'Time Format Changed' without quotes, and for text, added 'Updated Format to %time_12_24' without quotes. This will notify that you have logged the format and will tell what the format is.
OPTIONAL: Task -> Wait. Set it for 10 seconds. This will make Tasker wait 10 seconds to move on to the next action
OPTIONAL: Alert -> Notify Cancel. For Title: put 'Time Format Changed' without quotes, and have Warn Not Exist checked. This will dismiss that notification we just sent 10 seconds ago
Task -> End If. Close that If stated that we have created so far
Variables -> Variable Set. Set %TIME_FORMAT to %time_12_24. This will override the previously recorded value and place the new one in its place in the variable, %TIME_FORMAT
Task -> Stop. Leave everything else blank. This will make Tasker end the task from here
Task -> Else. Leave everything else blank. This basically says that if that system format variable DOES have something in it. This is necessary to check because
OPTIONAL: Alert -> Notify Vibrate. For Title: put 'Logged Format Time' without quotes, and for text, added 'Log Format: %time_12_24' without quotes. This will notify that you have logged the format and will tell what the format is.
OPTIONAL: Task -> Wait. Set it for 10 seconds. This will make Tasker wait 10 seconds to move on to the next action
OPTIONAL: Alert -> Notify Cancel. For Title: put 'Logged Format Time' without quotes, and have Warn Not Exist checked. This will dismiss that notification we just sent 10 seconds ago
Variables -> Variable Set. Set %TIME_FORMAT to %time_12_24. This records the value we got from AutoTools and stores it in a global variable for us to use later on.
Task -> End If. Close up the main IF statement that surrounds everything.
One final thing! Make sure that your watchface in WM has this method or something similar (WITH the quotes): '{ttime_12_24}' == '24' and '{dh23z}:{dmz}' or '{dh}:{dmz} {da}'. This sets the clock format to 24hr if the tasker value is 24, and switches to 12hr if the value is 12.
Note: You DO NOT have to have items such as he notification and clock method text to display exactly as I have, as I have designed these for my convenience.
===Download===
The download files are attached below, you can import this by doing the following:
Long-press the little icon that looks like a house at the bottom of the main menu
Press Import
Locate the downloaded file
Tasker should do the rest and import the entire project and the profiles
===Final Notes===
If you have any questions or issues, please feel free to post them here! ^^
Hello,
I would like to exit my coyote application when I leave the Bluetooth.
I've already tried some tricks but I don't manage to get something that works every time.
Have you an idea how I can manage to exit coyote without root required?
Thanks,
Kevin
Use AutoInput then you could use the exit app task.
What if the app requires a Back followed by click on an OK prompt to exit? Can you help with the AutoInput task for that scenario?
JWadle said:
What if the app requires a Back followed by click on an OK prompt to exit? Can you help with the AutoInput task for that scenario?
Click to expand...
Click to collapse
The AutoApps forum I linked to earlier (exit task link) is a great place to get educated about those apps. Basically you need to do a:
plugin -> Auto input -> Global Action -> Back
followed by a:
plugin -> Auto input -> Action
Which needs to be configured with:
Action -> Click
Field type -> text
Field text -> OK
** that configuration is based on your example. YMMV
A1: AutoInput Global Action [ Configuration:Action: Back Timeout (Seconds):20 ]
A2: AutoInput Action [ Configuration:Type: Text
Value: ok
Action : Click Timeout (Seconds):20 ]
ktmom said:
The AutoApps forum I linked to earlier (exit task link) is a great place to get educated about those apps. Basically you need to do a:
plugin -> Auto input -> Global Action -> Back
followed by a:
plugin -> Auto input -> Action
Which needs to be configured with:
Action -> Click
Field type -> text
Field text -> OK
** that configuration is based on your example. YMMV
A1: AutoInput Global Action [ Configuration:Action: Back Timeout (Seconds):20 ]
A2: AutoInput Action [ Configuration:Type: Text
Value: ok
Action : Click Timeout (Seconds):20 ]
Click to expand...
Click to collapse
I've searched in this way but my phone is locked with a pin code so I need another solution. Or maybe an improved one.
I've tried with AutoNotifications to use the exit button that sit in the "open coyote" notification. But it's not really stable and I need to quit coyote manually about 1 time on 2.
Thanks for your help.
Kevin
Hi, I want to do something with tasker and I can't how to do
I want to disable call vibration + disable pin lock security when I go out from my wifi range
And enable it when I am in range
Please help
Please help
This approach requires your device to be rooted to work around the Android limitations for secure lock screens.
Start with a profile that is triggered by the presence of your wifi network.
Create a new profile:
State -> Net -> WiFi Connected
Configure to your specific WiFi network. If you do this while actually connected to the network it will be easier.
Now create an enter task to enable vibration and secure lock screen (sets the secure lock screen to engage 1 minute after screen off = 3600 seconds).
Audio -> Vibrate Mode [
Mode:Vibrate
]
Code -> Run Shell [
Command:Settings put secure lock_screen_lock_after_timeout 3600
Timeout (Seconds):0
Use Root: on
Store Output In:
Store Errors In:%LockScreenError
Store Result In:
Continue Task After Error: on
]
Create an exit task to disable vibration and secure lock screen (sets the secure lock screen to engage 1 day after screen off = 86400 seconds).
Audio -> Vibrate Mode [
Mode: off
]
Code -> Run Shell [
Command:settings put secure lock_screen_lock_after_timeout 86400
Timeout (Seconds):30
Use Root: on
Store Output In:
Store Errors In:%UnLockScreenError
Store Result In:
Continue Task After Error: on
]
To better understand using root shells to modify secure settings see Replace Secure Settings with Shell Commands
I have a Pixel 4 XL (rooted), there is a way to enable High Brightness Mode when the screen is at 100% brightness and by entering the following in Terminal Emulator.
su
echo on >> /sys/class/backlight/panel0-backlight/hbm_mode
This only sticks until the screen goes off and needs to be ran again to get it on again. I'd like to make a task so that it automatically turns on when the screen is at 100% brightness but I have no idea how to do it. I've watched a few videos but I'm still not sure what to do. Thanks in advance.
Add a task and make sure to name it.
Add an action to the task code -> run shell.
On the line for command put your terminal command;
echo on >> /sys/class/backlight/panel0-backlight/hbm_mode
Tick the box for use root.
Tap the [emoji809] on the line with the "if"
On the first line put the variable %BRIGHT
Tap the center button (probably displays a ~)
Select "Maths: greater than" (will now display a > )
On the second line, enter 230 (* see further down for an explanation)
Back out of the task to save it.
Now create a profile, with the context of event -> display -> display on
Link the task you created above
What this does is each time the display turns on, the associated task will run. But the code will execute only if the display brightness is above the level set. You will need to play with the number to your satisfaction.
On my Pixel 3XL, stock Pie, 237 is actually the highest I've seen brightness go. In theory, 255 is the highest. Other (non pixel devices) have reported an order of magnitude higher. You can view the value of the variable in an alert -> flash action.
If there is a specific app that you will be using, then adding that as a profile context will reduce the number of times the profile will run. Or any other way to narrow down the active condition, maybe a state -> light level context.
ktmom said:
Add a task and make sure to name it.
Add an action to the task code -> run shell.
On the line for command put your terminal command;
echo on >> /sys/class/backlight/panel0-backlight/hbm_mode
Tick the box for use root.
Tap the [emoji809] on the line with the "if"
On the first line put the variable %BRIGHT
Tap the center button (probably displays a ~)
Select "Maths: greater than" (will now display a > )
On the second line, enter 230 (* see further down for an explanation)
Back out of the task to save it.
Now create a profile, with the context of event -> display -> display on
Link the task you created above
What this does is each time the display turns on, the associated task will run. But the code will execute only if the display brightness is above the level set. You will need to play with the number to your satisfaction.
On my Pixel 3XL, stock Pie, 237 is actually the highest I've seen brightness go. In theory, 255 is the highest. Other (non pixel devices) have reported an order of magnitude higher. You can view the value of the variable in an alert -> flash action.
If there is a specific app that you will be using, then adding that as a profile context will reduce the number of times the profile will run. Or any other way to narrow down the active condition, maybe a state -> light level context.
Click to expand...
Click to collapse
Thank you very much, I'll give it a shot.