Need to ask about tasker - Tasker Tips & Tricks

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

Related

Tasker Noob Help

i'm not to familiar with Tasker and I have never use it before and i'm trying to make two profiles, obviously a step by step would be helpful
1-" Profile: Enable Hotword Detection (180)
Event: Display Off
Enter: Anon (182)
A1: Run Shell [ Command:dumpsys battery set ac 1 Timeout (Seconds):0 Use Root : on Store Output In: Store Errors In: Store Result In: ] "
and the other one is: ->->->->->->
2-" Profile: Disable Hotword Detection (191)
Event: Display Unlocked
Enter: Anon (192)
A1: Run Shell [ Command:dumpsys battery reset Timeout (Seconds):0 Use Root : on Store Output In: Store Errors In: Store Result In: ] "

Exit coyote app with tasker - No root

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

Just can't get some simple tasks to work

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

How to force landscape on Galaxy S9?

On my S6, I could use Rotation Locker in Tasker to force the phone into landscape. The home screen, wallpaper, and everything looked good.
On the S9, Rotation Locker does not work correctly. The wallpaper remains portrait. As soon as I pull down the notification shade, the phone switches to portrait - and it's locked into portrait for all apps! I have to switch the phone setting back to auto-rotate.
I want a Task that will force the phone into landscape. This is triggered by my car Bluetooth so that I can mount my phone horizontally.
I heard that the S9 should be able to have the home screen in landscape. However, "Home Screen" is grayed-out in my Display settings. Also, I don't want the phone to always rotate the home screen, I just want to force landscape when I connect to my car Bluetooth.
Actually, part of my issue might be because I'm using Nova Launcher. I was able to change it from "default" to "auto-rotate", and the home screen seems to rotate now. So, I think that question is probably answered.
Unfortunately, I still don't have a solution for my car mode Task. I only want the home screen to be in landscape if I'm connected to my car's Bluetooth. Rotation Locker still doesn't work correctly with the S9.
This
This is what I have :
Code:
A1: If [ %inCar ~ true ]
<accelerometer disabled, accelerometer_rotation set to 0>
A2: AutoTools Secure Settings [
Configuration:Setting
Type: System
Name: accelerometer_rotation
Input Type: String
Value: 0
Timeout (Seconds):60
<90 degree rotation, user_rotation set to 1>
A3: AutoTools Secure Settings [
Configuration:Setting
Type: System
Name: user_rotation
Input Type: Int
Value: 1
Timeout (Seconds):60
A4: Else
<accelerometer enabled, accelerometer_rotation set to 1>
A5: AutoTools Secure Settings [
Configuration:Setting
Type: System
Name: accelerometer_rotation
Input Type: String
Value: 1
Timeout (Seconds):60
<0 degree rotation, user_rotation set to 0>
A6: AutoTools Secure Settings [
Configuration:Setting
Type: System
Name: user_rotation
Input Type: Int
Value: 0
Timeout (Seconds):60
You can use Secure Settings or Secure Task if you prefer.
An app called Ultimate Rotation Control has a Tasker plugin and it allows me to control rotation how I want.

Airplane Mode radios dependend on what is turned on/off

Hello dear community,
I've been trying to get Tasker to put my phone into airplane mode, but dependend on what type of connections are active, it should keep certain radios on or turn them off dynamically. So, for example if I am connected to Wifi, it should keep Wifi on but turn the rest off. If I now turn Bluetooth on as well, it should change the airplane mode radios to keep Bluetooth and Wifi on. Same for cell/Service. Is that somehow realisable? Maybe with ifs and elses? I am open for ideas
Yes, you just need to define the logic flow. The action to use is probably Airplane Radios.
You could easily have a single task, with multiple instances of the Airplane Radios action, each with an if statement(s) that defines what condition should be met before it runs. For example, "if *%WIFI ~ off AND %BLUE !~ off" then the Airplane Radios action with turning off the wifi radio and leaving the BT radio on would be run.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Hey, it's me again. First thank you very much for the response. I managed to make the profile work with WiFi and cell service, but Bluetooth still shuts down even though by the if statement it shouldn't. What I did was I put as condition airplane mode on and as tasks: if Wifi on then airplane mode radios Bluetooth on cell on nfc on Wifi off wimax on. Same for cell but with Wifi on and cell off. For Bluetooth i did the same with Bluetooth off and the rest on. Where did I made the mistake? Or is Bluetooth a Problem on Nougat? Thanks in advance and greetings.
Please post your profile. Make sure it's named - not a default name assigned by tasker. To name the profile if it isn't already, long press on the name to highlight the profile and, at the top, tap the square with the A.
Then long press on the name to highlight the profile. Go to the 3-dot menu and select export -> Description to Clipboard.
Now you'll be able to paste it. Be aware, it easier to use pastebin and link to a post here. If you paste in a post here, the forum software will convert all semicolons with characters directly after to emoticons making it very hard to read.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Profile: Flugmodus (40)
State: Airplane Mode
Enter: Radios (41)
A1: If [ %BTStatus ~ 1 ]
A2: Secure Settings [ Configuration:Airplane Mode Radios: Cell, NFC, WiFi, WiMax Timeout (Seconds):0 ]
A3: End If
A4: If [ %WiFiStatus ~ 1 ]
A5: Secure Settings [ Configuration:Airplane Mode Radios: Cell, Bluetooth, NFC, WiMax Timeout (Seconds):0 ]
A6: End If
A7: If [ %CELLSRV ~ noservice | %CELLSIG ~ 0 ]
A8: Secure Settings [ Configuration:Airplane Mode Radios: Bluetooth, NFC, WiFi, WiMax Timeout (Seconds):0 ]
A9: End If
A10: If [ %BTStatus ~ 1 & %WiFiStatus ~ 1 ]
A11: Secure Settings [ Configuration:Airplane Mode Radios: Cell, NFC, WiMax Timeout (Seconds):0 ]
A12: End If
Exit: Flugmodus aus (64)
A1: Secure Settings [ Configuration:Airplane Mode Disabled Timeout (Seconds):0 ]
BTStatus and WiFiStatus are set to 1 when BT and WiFi are connected and are set to 0 if not connected.
Edit: I changed the condition to display off, still no change. WiFi and cell work while BT doesn't and shuts down although I have my BT headphones connected and BTStatus is on 1.
A7 turns off the BT radio whether it's connected or not. Maybe you should add a "AND %BTStatus !~ 1" condition.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
That did the trick. You really helped me out there. I literally thought I must be stupid, but I just couldn't figure out where the profile went wrong. Thank you and I appreciate your time and effort.
And it's me (again...). So, the profile worked fine until I had to reboot my phone. I didn't change anything on that task, I just updated Tasker. And now the profile shuts Bluetooth down again. Any ideas on that or is it buggy?
Whenever a profile is not functioning as expected, you need to post the full profile description (as before). You should also grab a Tasker log covering the activation and execution of the profile.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Profile: Flugmodus Status (28)
State: Airplane Mode
Enter: Radios (40)
A1: If [ %BTStatus ~ 1 ]
A2: Secure Settings [ Configuration:Airplane Mode Radios: Cell, NFC, WiFi, WiMax Timeout (Seconds):0 ]
A3: End If
A4: If [ %WiFiStatus ~ 1 ]
A5: Secure Settings [ Configuration:Airplane Mode Radios: Cell, Bluetooth, NFC, WiMax Timeout (Seconds):0 ]
A6: End If
A7: If [ %CELLSRV ~ noservice & %BTStatus !~ 1 ]
A8: Secure Settings [ Configuration:Airplane Mode Radios: Bluetooth, NFC, WiFi, WiMax Timeout (Seconds):0 ]
A9: End If
A10: If [ %BTStatus ~ 1 & %WiFiStatus ~ 1 ]
A11: Secure Settings [ Configuration:Airplane Mode Radios: Cell, NFC, WiMax Timeout (Seconds):0 ]
A12: End If
Exit: Flugmodus aus (64)
A1: Run Shell [ Command:settings put global airplane_mode_on 0 ; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false Timeout (Seconds):0 Use Rootn Store Output In: Store Errors In: Store Result In: ]
A2: Run Shell [ Command:settings put global airplane_mode_radios "cell,bluetooth,nfc,wimax,wifi" Timeout (Seconds):0 Use Rootn Store Output In: Store Errors In: Store Result In: ]
This is the profile. And the log is in the Attachment.
I don't know what OS version you are using, but the intangible objects secure settings plug-in is obsolete starting at marshmallow. What are you trying to use from it?
Also make sure Tasker is whitelisted in greenify.
You've posted the task, but what triggers the task; something from secure settings? That top level profile (that includes the triggering context) is what is helpful to post. It includes the task as well.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Profile: Flugmodus Status (28)
State: Display State [ Isff ]
Enter: Radios (40)
A1: If [ %BTStatus ~ 1 ]
A2: Custom Setting [ Type:Global Name:airplane_mode_radios Value:cell,nfc,wimax,wifi Use Rootn Read Setting To: ]
A3: End If
Exit: Flugmodus aus (64)
A1: Run Shell [ Command:settings put global airplane_mode_on 0 ; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false Timeout (Seconds):0 Use Rootn Store Output In: Store Errors In: Store Result In: ]
A2: Run Shell [ Command:settings put global airplane_mode_radios "cell,bluetooth,nfc,wimax,wifi" Timeout (Seconds):0 Use Rootn Store Output In: Store Errors In: Store Result In: ]
So, this was a test run to see if it was a BT problem, a secure settings problem or a problem in the logic flow. I am on Nougat and as you said, secure settings is obsolete. So I changed that up to custom settings and ticked use Root to ensure proper execution (also used ADB to give Tasker WRITE_SECURE_SETTINGS permission). I also later tried with the integrated Tasker option for the airplanemode radios. It still turns off Bluetooth when entering airplane mode, although I explicitly told Tasker not to do so if connected. This is the log of the test where I turned all profiles off but not the airplanemode radio one and the BT Status one.
In your log, it looks like you have battling profiles. Energiesparmodus seems to be taking action on airplane mode as well as Flugmodus.
To effectively troubleshoot this, you really should disable all profiles except the one you are focused on.
Additionally, it looks like Energiesparmodus is setting power saving on Tasker on screen of and is running prior to Flugmodus.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Ok, before I test the rest: I have to turn the airplane mode on first then turn on energy saving mode? In the same profile?

Categories

Resources