How to disable the keyguard with Tasker - Tasker Tips & Tricks

Hi,
Being able to disable the keyguard can be useful in some situations. For instance, you may want to keep your device unlock when staying at home. The common way to do this is to use the Tasker plugin SecureTask. The plugin has first to be set as device owner (see baldapps.altervista.org/deviceowner.html for the details). Unfortunately, some of the Samsung devices with Oreo do not allow device administrator. The device is locked with the following message "Unauthorized software has been installed on your device. Workspace has been locked to prevent unauthorized access. Contant your admin".
I found another way to disable the keyguard with the command "locksettings" for devices with Android Oreo or newer. To create a action to disable the keyguard, you have to choose: Create a new Action -> Category Code -> Run Shell. Then, the command text field should contain the following code: "locksettings clear --old XXXX" with XXXX being your pin code. For the action to enable the keyguard, the code should be "locksettings set-pin XXXX". You have to use root for both of these actions. "locksettings" can also be used with pattern and password. See here: android.googlesource.com/platform/frameworks/base/+/android-8.0.0_r1/cmds/locksettings/src/com/android/commands/locksettings/LockSettingsCmd.java.

There is an easy reliable workaround for non-root devices:
When at Home-WLAN or in car:
Just use tasker's custom settings to set the "lock_screen_lock_after_timeout" to e.g. 4 hours.
This means that after display off the device is unlocked for 4 hours. When you leave home or car, just the the value back to 30 sec.

If my understanding is correct, changing the value of "lock_screen_lock_after_timeout" does not actually unlock the device. You still need to unlock and then it will stay unlocked for the duration specified by lock_screen_lock_after_timeout. The command "locksettings" completely disable the keyguard.
Tatsch said:
There is an easy reliable workaround for non-root devices:
When at Home-WLAN or in car:
Just use tasker's custom settings to set the "lock_screen_lock_after_timeout" to e.g. 4 hours.
This means that after display off the device is unlocked for 4 hours. When you leave home or car, just the the value back to 30 sec.
Click to expand...
Click to collapse

Of course, but for me that doesn't matter in everyday life. If the phone is currently locked, a one-time unlock is sufficient.
The main thing is that the device is always unlocked at home and in the car.

Do you think it would be possible to disable the lockscreen of an oreo rooted phone without knowing if it is protected by a pattern or a pin or a password? Disabling keyguard with the secure settings app does not work.

Yes, it is possible. But, you have to provide the pin code, pattern code or password.
lucaterpirla said:
Do you think it would be possible to disable the lockscreen of an oreo rooted phone without knowing if it is protected by a pattern or a pin or a password? Disabling keyguard with the secure settings app does not work.
Click to expand...
Click to collapse

lucaterpirla said:
Do you think it would be possible to disable the lockscreen of an oreo rooted phone without knowing if it is protected by a pattern or a pin or a password? Disabling keyguard with the secure settings app does not work.
Click to expand...
Click to collapse
I have previously posted my method of "disabling" lock screen when I'm at home. I use a stupid silly long lock screen after sleep time out. This is executed as a run shell action with run as root enabled.
To "disable" the lock screen (delay for 24 hours after sleep);
settings put secure lock_screen_lock_after_timeout 86400000
Then to enable the lock after screen off (delay 5 seconds after sleep);
settings put secure lock_screen_lock_after_timeout 5000
This method,while a bit goofy, has been working reliably for me since Lollipop on an N6 and I'm currently on Pie on an essential PH-1.
There is also the tried and true Smart Lock feature in modern Android.
I'm not at all sure it will work on every device, and likely not on Samsung touchwiz devices.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini

@ktmom
This is what I described above.
But there is no need to be rooted.
Use instead Tasker's "Custom Setting".

Tatsch said:
@ktmom
This is what I described above.
But there is no need to be rooted.
Use instead Tasker's "Custom Setting".
Click to expand...
Click to collapse
You either must be rooted (and tick the user root option) or use ADB and give write settings permission to Tasker (or AutoTools).
There are several ways to achieve the same goal these days.
My answer was really directed to a specific question describing a rooted phone [emoji6]
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini

@ktmom Ok. But many other users will read this thread. And it's much easier just executing one adb-command than rooting the phone.

This is a very elegant solution. I've been using SecureTask for years, but for some reason now the broadcast for disable keyguard isn't being sent (no idea why). Is it supposed to remove the lockscreen completely, or just disable the keyguard? Currently it will remove the passcode fine, but I still have to slide up to unlock.

You can use "wm dismiss-keyguard". This is the tasker task that I am using for unlocking my phone:
<TaskerData sr="" dvi="1" tv="5.9.rc">
<Task sr="task88">
<cdate>1540809008349</cdate>
<edate>1574980936233</edate>
<id>88</id>
<nme>ScreenLockOff</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">locksettings clear --old ??????</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act1" ve="7">
<code>664</code>
<Str sr="arg0" ve="3">kgm</Str>
<Str sr="arg1" ve="3">CONTEXT</Str>
<Str sr="arg2" ve="3">getSystemService
{KeyguardManager} (String)</Str>
<Str sr="arg3" ve="3">keyguard</Str>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act2" ve="7">
<code>664</code>
<Str sr="arg0" ve="3">%locked</Str>
<Str sr="arg1" ve="3">kgm</Str>
<Str sr="arg2" ve="3">isKeyguardLocked
{boolean} ()</Str>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act3" ve="7">
<code>37</code>
<label>Check if the screen is locked</label>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%locked</lhs>
<op>0</op>
<rhs>true</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act4" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">wm dismiss-keyguard</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act5" ve="7">
<code>38</code>
</Action>
</Task>
</TaskerData>

LeBobbo said:
You can use "wm dismiss-keyguard". This is the tasker task that I am using for unlocking my phone:
<TaskerData sr="" dvi="1" tv="5.9.rc">
<Task sr="task88">
<cdate>1540809008349</cdate>
<edate>1574980936233</edate>
<id>88</id>
<nme>ScreenLockOff</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">locksettings clear --old ??????</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act1" ve="7">
<code>664</code>
<Str sr="arg0" ve="3">kgm</Str>
<Str sr="arg1" ve="3">CONTEXT</Str>
<Str sr="arg2" ve="3">getSystemService
{KeyguardManager} (String)</Str>
<Str sr="arg3" ve="3">keyguard</Str>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act2" ve="7">
<code>664</code>
<Str sr="arg0" ve="3">%locked</Str>
<Str sr="arg1" ve="3">kgm</Str>
<Str sr="arg2" ve="3">isKeyguardLocked
{boolean} ()</Str>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act3" ve="7">
<code>37</code>
<label>Check if the screen is locked</label>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%locked</lhs>
<op>0</op>
<rhs>true</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act4" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">wm dismiss-keyguard</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act5" ve="7">
<code>38</code>
</Action>
</Task>
</TaskerData>
Click to expand...
Click to collapse
So just run that when the display turns on?
Also how on earth do I import that without it overwriting everything else I've ever done? XD

You need to run this when you want to unlock your phone (disable the pattern lock and dismiss the keyguard).
Copy/paste the xml data to a text file. The file name should be whatever_you_like.tsk.xml. You need to replace the ???? in the file with your pattern code. You can then import this file into tasker. You should consult the user manual of Tasker for this.

LeBobbo said:
You can use "wm dismiss-keyguard".
[/I]
Click to expand...
Click to collapse
Thanks a lot, this is what i search for long time!!! BIG THANKS!

LeBobbo said:
You can use "wm dismiss-keyguard".
[/I]
Click to expand...
Click to collapse
Wonderful job. On LG H850 work perfect !
@LeBobbo can you write (exit)task who enable pin keyboard ?
Secure settings don't work I can't open this options... Your wm dismiss keyboard work excellent.
I have rooted Android 8.0 .
Wysłane z mojego LG-H850 przy użyciu Tapatalka

To lock your phone, you have to
- Execute "locksettings set-pattern ?????? --old ??????" to change the lock screen pattern or "locksettings set-password ???? --old ????" to change the lock screen pin. This is needed in case you have removed the pin code or the pattern code.
- Use this action "System Lock" in Tasker.

Let me introduce myself: Huawei P20 lite, android Pie 9, EMUI 9.1, SecureTask installed as a device owner.
The device is PIN protected, and I have activated all fingerprint functions. A couple of apps are password protected, and unlocking them is also possible with fingerprints stored on the device (and it's very convenient!). I am developing something in Tasker, and the unlocking is done through SecureTask, which works very well, and offers two possibilities: Keyguard disable and Password clear, both valid. However, in both methods, it is as if the password lock setting is deleted from the android settings menu. Obviously with the set password (always of SecureTask) the disappeared item is immediately restored.
There is however a side effect of this menu transition: the loss of fingerprint unlocking settings of the apps that provide it. For each of them I have to go back to their settings and reactivate their function, after each unlocking of the device with SecureTask!
Is there any different command in SecureTask that does an actual unlock, not a pwd suppression in android settings?
Is there a workaround to obtain an actual unlock, without loss for (provided) apps's fingerprint unlocking settings?
Thanks

I answer myself ... I think I have found a workaround for the problem.
I share the discovery, in case someone else has the same needs. It is a ready-to-use action [/ I] called "Enter_Your_PIN".
It is based on Autoinput and, in my case, it is not a problem since I also have that plug-in.
Enter_Your_PIN must be imported directly into the tasker, into the active project. Reading the content, after the import, you will find different labels that make you understand how it should be used.
Basically you will have to manually create two new variables% K .... (you can read the exact names in the labels), where to insert the pin which will then be used by Enter_Your_PIN ....
Hi

Luiss64 said:
I answer myself ... I think I have found a workaround for the problem.
I share the discovery, in case someone else has the same needs. It is a ready-to-use action [/ I] called "Enter_Your_PIN".
It is based on Autoinput and, in my case, it is not a problem since I also have that plug-in.
Enter_Your_PIN must be imported directly into the tasker, into the active project. Reading the content, after the import, you will find different labels that make you understand how it should be used.
Basically you will have to manually create two new variables% K .... (you can read the exact names in the labels), where to insert the pin which will then be used by Enter_Your_PIN ....
Hi
Click to expand...
Click to collapse
I use a pin and fingerprints for unlocking. My favored way is also to use AutoInput, no locksettings to edit/delete, fingerprints will be intact. So it's just letting Tasker type in the pin. Autoinput plugin must have all permissions of course.
It is simple on my phones, maybe similar to what your read-made action does. My task is basically:
Turn on screen
Run Shell : wm dismiss-keyguard
*Since I use a pin with 4 numbers, I just create an Autoinput action for each number (4 Autoinput actions) where each is :
Type : Id
Value: com.android.systemui:id/key0 (the number after key is from 0 to 9, just replace accordingly)
Action : Click
Wait 1 second or 500ms after each Autoinput action.

Related

[GUIDE][Difficulty: Intermediate]Read SMS Aloud When Connected To Your Car Bluetooth

So you are driving, your phone is connected to your car BT and someone sent you a SMS. Here is how Tasker can read it for you through you car speakers without even looking at your phone. What this Tasker profile will do is
Pause your Music (if any music was playing)
Say who this SMS is from
Read the SMS
Resume the music (if any music was playing before)
To do this, we will need 2 profiles, The first one is needed to do what is listed just above, the second one to monitor if any music was playing (because you don't want to resume your music after a SMS if no music was playing before)
Variables used:
%MTRACK The MTRACK variable is set to the media track name actually playing. If there is no media playing, MTRACK is unset. In this case we don't really care about the real value stored in MTRACK, we only need to know if there is one or not (if there is some music playing or not)
%SMSRN The SMSRN variable is the contact name from the last SMS received
%SMSRB The SMSRB variable is text body from the last SMS received
Instructions:
Profile/task #1:
Open Tasker and go at the profile page
Click the + sign to create a new profile and name it "Read SMS Aloud"
Select the "Event" trigger
in the "Select Event Category" menu, select "Phone"
in the "Select Phone Event" menu, select "Received Text"
In the Event Edit page, Select "Type" to "Any" and leave "Sender" and "Content" blank
Click your back button to exit and save the Even Edit page, this will bring your back to the Profiles page
Select "New Task" and name your task "Read SMS"
In the Task Edit page, click the + sign ---> Task ---> If
In the "Action Edit - If" page, set the Condition to "%MTRACK" and the Condition Operator to "Is Set" then click on your back button to save and go back to the Task Edit page.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click on the + sign ---> Media ---> Media Control
In the "Action Edit - Media Control" page, set the Cmd to "Pause" and deselect "Simulate Media Button" then click on your back button to save and go back to the Task Edit page.
Click on the + sign ---> Alert ---> Say
In the "Action Edit - Say" page, set Text to "SMS received from %SMSRN" and leave all the other settings by default for now (You'll be able to adjust these settings later if you want) then click on your back button to save and go back to the Task Edit page.
Click on the + sign ---> Task ---> Wait
In the "Action Edit - Wait" page, set Seconds to "1" then click on your back button to save and go back to the Task Edit page.
Click on the + sign ---> Alert ---> Say
In the "Action Edit - Say" page, set Text to "%SMSRB" and leave all the other settings by default for now (You'll be able to adjust these settings later if you want) then click on your back button to save and go back to the Task Edit page.
Click on the + sign ---> Task ---> Wait
In the "Action Edit - Wait" page, set Seconds to "1" then click on your back button to save and go back to the Task Edit page.
Click on the + sign ---> Media ---> Media Control
In the "Action Edit - Media Control" page, set the Cmd to "Play" and deselect "Simulate Media Button" then click on your back button to save and go back to the Task Edit page
Click on the + sign ---> Task ---> Wait
In the "Action Edit - Wait" page, set Seconds to "2" then click on your back button to save and go back to the Task Edit page.
In the Task Edit page, click the + sign ---> Task ---> Else
In the "Action Edit - Else" page, leave everything default then click on your back button to save and go back to the Task Edit page.
In the "Action Edit - Say" page, set Text to "SMS received from %SMSRN" and leave all the other settings by default for now (You'll be able to adjust these settings later if you want) then click on your back button to save and go back to the Task Edit page.
Click on the + sign ---> Task ---> Wait
In the "Action Edit - Wait" page, set Seconds to "1" then click on your back button to save and go back to the Task Edit page.
Click on the + sign ---> Alert ---> Say
In the "Action Edit - Say" page, set Text to "%SMSRB" and leave all the other settings by default for now (You'll be able to adjust these settings later if you want) then click on your back button to save and go back to the Task Edit page.
In the Task Edit page, click the + sign ---> Task ---> End If
In the Task Edit page, click your back button to save the task and go back to the Profile page
On your "Read SMS Aloud" profile, click and hold your "Received Text" trigger, select "Add" ---> State ---> Net ---> BT Connected. Make sure your bluetooth is actually turned ON and that your phone already connected at least once to your car, on the "State Edit - BT Connected" page, click the magnifying glass and select your Car bluetooth Name and Address. Click your back button to go back to the profile page.
Now your task should look like this:
In summary:
Context:
If any SMS received and phone is connected to your car BT
Task:
If there some music playing, pause it, say aloud the name and message from the SMS, resume music. Else (if there is no music playing) don't pause or resume any music, just say aloud the name and message from the SMS.
Note:
If the MTRACK variable is SET (music playing) the "IF" portion of the task is valid (green) and the "ELSE" portion is invalid (red)
If the MTRACK variable is NOT SET (music paused or stopped) the "IF" portion of the task is invalid (red) and the "ELSE" portion is valid (green)
Action #8 (Wait 2 seconds) is needed to give time to the MTRACK variable to be set again and detected by Tasker after resuming the music so the "Else" part stay invalid and that you don't end up with your SMS being read twice. You might need to increase this value depending on your phone.
Profile/task #2:
This profile is needed so the MTRACK variable is monitored. It looks like MTRACK isn't correctly monitored if directly integrated in a task, there must be a profile actively monitoring this variable so it can also be monitored in a task.
In the profiles page, click on the + sign, name your new profile "Monitor %MTRACK"
Select the "Event" trigger ---> Variable --> Variable Set
In the "State Edit - Variable Set" page, set the Variable to "%MTRACK" then hit the back button to go back at the Profiles page.
Select New Task, name your new task "Monitor %MTRACK" Click the + sign ---> Alert ---> Flash
In the Action Edit - Flash" page, set the Text to "%MTRACK"
Hit your back button to save and you're done.
Compatible with:
Google Play Music/Songza
Power Amp
Phantom Music Control Pro
You tell me
Remember that this profile might need some adjustments depending on your phone. It worked fine on my One M7
Profiles/Tasks to restore
Profile: Read SMS Aloud
Code:
<TaskerData sr="" dvi="1" tv="4.8m">
<Profile sr="prof10" ve="2">
<cdate>1450846827049</cdate>
<clp>true</clp>
<edate>1450854667845</edate>
<id>10</id>
<mid0>11</mid0>
<nme>Read SMS Aloud</nme>
<Event sr="con0" ve="2">
<code>7</code>
<pri>0</pri>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
<Str sr="arg2" ve="3"/>
</Event>
<State sr="con1" ve="2">
<code>3</code>
<Str sr="arg0" ve="3">VW BT 2903</Str>
<Str sr="arg1" ve="3">FC:62:B9:28:40:1F</Str>
</State>
</Profile>
<Task sr="task11">
<cdate>1450846870769</cdate>
<edate>1450859956935</edate>
<id>11</id>
<nme>Read SMS</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%MTRACK</lhs>
<op>12</op>
<rhs>0</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act1" ve="7">
<code>443</code>
<Int sr="arg0" val="1"/>
<Int sr="arg1" val="0"/>
<App sr="arg2"/>
</Action>
<Action sr="act10" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="1"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act11" ve="7">
<code>559</code>
<Str sr="arg0" ve="3">%SMSRB</Str>
<Str sr="arg1" ve="3">default:default</Str>
<Int sr="arg2" val="3"/>
<Int sr="arg3" val="5"/>
<Int sr="arg4" val="5"/>
<Int sr="arg5" val="1"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
</Action>
<Action sr="act12" ve="7">
<code>38</code>
</Action>
<Action sr="act2" ve="7">
<code>559</code>
<Str sr="arg0" ve="3">SMS received from %SMSRN</Str>
<Str sr="arg1" ve="3">default:default</Str>
<Int sr="arg2" val="3"/>
<Int sr="arg3" val="5"/>
<Int sr="arg4" val="5"/>
<Int sr="arg5" val="1"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
</Action>
<Action sr="act3" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="1"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act4" ve="7">
<code>559</code>
<Str sr="arg0" ve="3">%SMSRB</Str>
<Str sr="arg1" ve="3">default:default</Str>
<Int sr="arg2" val="3"/>
<Int sr="arg3" val="5"/>
<Int sr="arg4" val="5"/>
<Int sr="arg5" val="1"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
</Action>
<Action sr="act5" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="1"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act6" ve="7">
<code>443</code>
<Int sr="arg0" val="5"/>
<Int sr="arg1" val="0"/>
<App sr="arg2"/>
</Action>
<Action sr="act7" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="2"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act8" ve="7">
<code>43</code>
</Action>
<Action sr="act9" ve="7">
<code>559</code>
<Str sr="arg0" ve="3">SMS received from %SMSRN</Str>
<Str sr="arg1" ve="3">default:default</Str>
<Int sr="arg2" val="3"/>
<Int sr="arg3" val="5"/>
<Int sr="arg4" val="5"/>
<Int sr="arg5" val="1"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
</Action>
</Task>
</TaskerData>
Task: Read SMS
Code:
<TaskerData sr="" dvi="1" tv="4.8m">
<Task sr="task11">
<cdate>1450846870769</cdate>
<edate>1450859956935</edate>
<id>11</id>
<nme>Read SMS</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%MTRACK</lhs>
<op>12</op>
<rhs>0</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act1" ve="7">
<code>443</code>
<Int sr="arg0" val="1"/>
<Int sr="arg1" val="0"/>
<App sr="arg2"/>
</Action>
<Action sr="act10" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="1"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act11" ve="7">
<code>559</code>
<Str sr="arg0" ve="3">%SMSRB</Str>
<Str sr="arg1" ve="3">default:default</Str>
<Int sr="arg2" val="3"/>
<Int sr="arg3" val="5"/>
<Int sr="arg4" val="5"/>
<Int sr="arg5" val="1"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
</Action>
<Action sr="act12" ve="7">
<code>38</code>
</Action>
<Action sr="act2" ve="7">
<code>559</code>
<Str sr="arg0" ve="3">SMS received from %SMSRN</Str>
<Str sr="arg1" ve="3">default:default</Str>
<Int sr="arg2" val="3"/>
<Int sr="arg3" val="5"/>
<Int sr="arg4" val="5"/>
<Int sr="arg5" val="1"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
</Action>
<Action sr="act3" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="1"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act4" ve="7">
<code>559</code>
<Str sr="arg0" ve="3">%SMSRB</Str>
<Str sr="arg1" ve="3">default:default</Str>
<Int sr="arg2" val="3"/>
<Int sr="arg3" val="5"/>
<Int sr="arg4" val="5"/>
<Int sr="arg5" val="1"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
</Action>
<Action sr="act5" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="1"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act6" ve="7">
<code>443</code>
<Int sr="arg0" val="5"/>
<Int sr="arg1" val="0"/>
<App sr="arg2"/>
</Action>
<Action sr="act7" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="2"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act8" ve="7">
<code>43</code>
</Action>
<Action sr="act9" ve="7">
<code>559</code>
<Str sr="arg0" ve="3">SMS received from %SMSRN</Str>
<Str sr="arg1" ve="3">default:default</Str>
<Int sr="arg2" val="3"/>
<Int sr="arg3" val="5"/>
<Int sr="arg4" val="5"/>
<Int sr="arg5" val="1"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
</Action>
</Task>
</TaskerData>
Profile: Monitor MTRACK
Code:
<TaskerData sr="" dvi="1" tv="4.8m">
<Profile sr="prof14" ve="2">
<cdate>1450850534030</cdate>
<edate>1450856245620</edate>
<id>14</id>
<mid0>15</mid0>
<nme>Monitor %MTRACK</nme>
<Event sr="con0" ve="2">
<code>3050</code>
<pri>0</pri>
<Str sr="arg0" ve="3">%MTRACK</Str>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="0"/>
</Event>
</Profile>
<Task sr="task15">
<cdate>1450850560377</cdate>
<edate>1450856245620</edate>
<id>15</id>
<nme>Monitor %MTRACK</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>548</code>
<Str sr="arg0" ve="3">%MTRACK</Str>
<Int sr="arg1" val="0"/>
</Action>
</Task>
</TaskerData>
Task: Monitor MTRACK
Code:
<TaskerData sr="" dvi="1" tv="4.8m">
<Task sr="task15">
<cdate>1450850560377</cdate>
<edate>1450856245620</edate>
<id>15</id>
<nme>Monitor %MTRACK</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>548</code>
<Str sr="arg0" ve="3">%MTRACK</Str>
<Int sr="arg1" val="0"/>
</Action>
</Task>
</TaskerData>
Thanks
Sent from my SM-G928V using Tapatalk
MANswers said:
Thanks
Sent from my SM-G928V using Tapatalk
Click to expand...
Click to collapse
Or just use "ok google" then "read last messages"
wozn said:
Or just use "ok google" then "read last messages"
Click to expand...
Click to collapse
Which will requires you to take your phone, unlock it and send 3 vocal commands while driving ("ok google", read last message", "yes"). This Tasker profile will do everything for you without having to do anything with your phone. Also have to mention that this is a Tasker forum section, there might be different way to achieve the same result but if its without Tasker then its off topic here but however its a valuable option for ppl without Tasker :good:
This is awesome! I had no idea Tasker could control things to this extent!
Thank you!
Hi, great profile just a question before I try to make it work when my headset is plugged, do I have to "create" the variables you use before I start ? I've never played with variables :s
Envoyé de mon A0001 en utilisant Tapatalk
Awesome work OP. This is a very useful profile!
nicolahaye said:
Hi, great profile just a question before I try to make it work when my headset is plugged, do I have to "create" the variables you use before I start ? I've never played with variables :s
Envoyé de mon A0001 en utilisant Tapatalk
Click to expand...
Click to collapse
No, all 3 variables used in this profile are Global Built-In Variables that are always monitored by Tasker:
Music Track (dynamic,monitored)))
%MTRACK
The current playing music track, supported for:
Tasker actions Music Play and Music Play Dir
Built-in Android music-player, probably not on all devices however
Power AMP
BeyondPod (Tasker v1.2.1+)
Phantom Music Control Pro
Media Utilities
Priority: if both Tasker and one of the other supported apps are playing simultaneously, the non-Tasker track will be shown. If more than one of the other supported apps is playing simultaneuosly, behaviour is unspecified.
Notes:
if you don't have a supported player, you could try Phantom Music Control Pro or Media Utilities, which support a lot of players and should pass the info on to Tasker
pausing a track clears the variable, unpausing sets it again
your music player may need an option enabled in order to broadcast the track information, or the broadcast may only be available in a 'pro' version
Text From/Date/Subject/Time (monitored)
%SMSRF / %SMSRN / %SMSRB / %MMSRS / %SMSRD / %SMSRT
The sender address, name, body, subject, date and time of the last text (SMS or MMS) received.
These variables will be empty until the first time a text is received after they have been referenced because Tasker does not monitor texts unless it's needed.
Name is set to sender address of no contact could be looked up. It's unavailable on Android versions prior to 2.0.
Body (%SMSRB) is only set for SMSs.
Subject (%MMSRS) is only set for MMSs.​
DrGreenway said:
Awesome work OP. This is a very useful profile!
Click to expand...
Click to collapse
Thanks for your feedback :good:
wozn said:
Or just use "ok google" then "read last messages"
Click to expand...
Click to collapse
Too long a process whilst driving. If only "read last message" worked with Android wear.
Sent from my SM-G925F using Tapatalk
Hi alray,
Exemplary work Sir, and very impressive. So please don't think of me as nit-picking, but I do have a small suggestion. In the first profile instruction set I noticed what may be an oversight. Perhaps you would consider the following insertion after step 26:
26. In the "Action Edit - Else" page, leave everything default then click on your back button to save and go back to the Task Edit page.
Click on the + sign ---> Alert ---> Say​27. In the "Action Edit - Say" page, set Text to "SMS received from %SMSRN" and leave all the other settings by default for now (You'll be able to adjust these settings later if you want) then click on your back button to save and go back to the Task Edit page.
In any case, I understood what you meant and I gave a 'thumbs-up' to your work. It is running on my stock Nexus 6 (MMB29V) without fault, though I'll be reworking it a bit to fit my needs. So again, many thanks!
did it work for someone ? doesn't work on my honda 2015
macpain64 said:
did it work for someone ? doesn't work on my honda 2015
Click to expand...
Click to collapse
from post #1
Remember that this profile might need some adjustments depending on your phone. It worked fine on my One M7
Click to expand...
Click to collapse
so
1- yes its working for some
2- You might need to adapt the profile to your phone. What exactly, hard to tell. The only info you've provided is that you're driving an honda. Might want to share your profile, post some screenshots, phone info, etc...
Hi, this task seems great!
I'm new to tasker, i downloaded it like a week ago, and i'd like to know if it is possibl to do the same with emails...
regards,

reading aloud new Aquamail emails

Hi Tasker enthusiasts
I'm struggling to get this relatively simple profile working properly. As the title indicates, trying to get basic email message information read aloud to me when the headphones are plugged in. A similar profile works fine for text messages, but clearly email clients are more complicated...
Using autonotification. All permissions & accessability look fine.
Profile below:
<TaskerData sr="" dvi="1" tv="4.9u4m">
<Profile sr="prof65" ve="2">
<cdate>1489184189280</cdate>
<edate>1489289411041</edate>
<id>65</id>
<limit>true</limit>
<mid0>59</mid0>
<nme>Read Aquamail</nme>
<Event sr="con0" ve="2">
<code>1520257414</code>
<pri>0</pri>
<Bundle sr="arg0">
<Vals sr="val">
<AllFields>false</AllFields>
<AllFields-type>java.lang.Boolean</AllFields-type>
<App><null></App>
<App-type>java.lang.String</App-type>
<BigImageNames><null></BigImageNames>
<BigImageNames-type>java.lang.String</BigImageNames-type>
<BigTextNames><null></BigTextNames>
<BigTextNames-type>java.lang.String</BigTextNames-type>
<CaseinsensitiveApp>false</CaseinsensitiveApp>
<CaseinsensitiveApp-type>java.lang.Boolean</CaseinsensitiveApp-type>
<CaseinsensitivePackage>false</CaseinsensitivePackage>
<CaseinsensitivePackage-type>java.lang.Boolean</CaseinsensitivePackage-type>
<CaseinsensitiveText>false</CaseinsensitiveText>
<CaseinsensitiveText-type>java.lang.Boolean</CaseinsensitiveText-type>
<CaseinsensitiveTitle>false</CaseinsensitiveTitle>
<CaseinsensitiveTitle-type>java.lang.Boolean</CaseinsensitiveTitle-type>
<ExactApp>false</ExactApp>
<ExactApp-type>java.lang.Boolean</ExactApp-type>
<ExactPackage>false</ExactPackage>
<ExactPackage-type>java.lang.Boolean</ExactPackage-type>
<ExactText>false</ExactText>
<ExactText-type>java.lang.Boolean</ExactText-type>
<ExactTitle>false</ExactTitle>
<ExactTitle-type>java.lang.Boolean</ExactTitle-type>
<HasReplyAction>false</HasReplyAction>
<HasReplyAction-type>java.lang.Boolean</HasReplyAction-type>
<Id><null></Id>
<Id-type>java.lang.String</Id-type>
<ImageNames><null></ImageNames>
<ImageNames-type>java.lang.String</ImageNames-type>
<InterceptApps><StringArray sr=""><_array_InterceptApps0>org.kman.AquaMail</_array_InterceptApps0><_array_InterceptApps1>com.android.providers.settings</_array_InterceptApps1><_array_InterceptApps2>com.whatsapp</_array_InterceptApps2></StringArray></InterceptApps>
<InterceptApps-type>[Ljava.lang.String;</InterceptApps-type>
<InterceptPersistent><null></InterceptPersistent>
<InterceptPersistent-type>java.lang.String</InterceptPersistent-type>
<InvertApp>false</InvertApp>
<InvertApp-type>java.lang.Boolean</InvertApp-type>
<InvertPackage>false</InvertPackage>
<InvertPackage-type>java.lang.Boolean</InvertPackage-type>
<InvertText>false</InvertText>
<InvertText-type>java.lang.Boolean</InvertText-type>
<InvertTitle>false</InvertTitle>
<InvertTitle-type>java.lang.Boolean</InvertTitle-type>
<PackageName><null></PackageName>
<PackageName-type>java.lang.String</PackageName-type>
<RegexApp>false</RegexApp>
<RegexApp-type>java.lang.Boolean</RegexApp-type>
<RegexPackage>false</RegexPackage>
<RegexPackage-type>java.lang.Boolean</RegexPackage-type>
<RegexText>false</RegexText>
<RegexText-type>java.lang.Boolean</RegexText-type>
<RegexTitle>false</RegexTitle>
<RegexTitle-type>java.lang.Boolean</RegexTitle-type>
<Text><null></Text>
<Text-type>java.lang.String</Text-type>
<TextNames>%aqmfrom %aqmsubject </TextNames>
<TextNames-type>java.lang.String</TextNames-type>
<Title><null></Title>
<Title-type>java.lang.String</Title-type>
<Type>0</Type>
<Type-type>java.lang.String</Type-type>
<com.twofortyfouram.locale.intent.extra.BLURB>Event Behaviour: true
Notification Type: Only Created Notifications
Notification Apps: AquaMail,Settings Storage,WhatsApp
Text Names : %aqmfrom %aqmsubject </com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.EXTRA_NSR_DEPRECATED>true</net.dinglisch.android.tasker.EXTRA_NSR_DEPRECATED>
<net.dinglisch.android.tasker.EXTRA_NSR_DEPRECATED-type>java.lang.Boolean</net.dinglisch.android.tasker.EXTRA_NSR_DEPRECATED-type>
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>InterceptApps Type TextNames plugininstanceid plugintypeid </net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>java.lang.String</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
<plugininstanceid>9efda956-e661-42a3-8f5e-112fa519fcc5</plugininstanceid>
<plugininstanceid-type>java.lang.String</plugininstanceid-type>
<plugintypeid>com.joaomgcd.autonotification.intent.IntentInterceptNotificationEvent</plugintypeid>
<plugintypeid-type>java.lang.String</plugintypeid-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.joaomgcd.autonotification</Str>
<Str sr="arg2" ve="3">com.joaomgcd.autonotification.activity.ActivityConfigNotificationInterceptTaskerEvent</Str>
</Event>
<State sr="con1" ve="2">
<code>30</code>
<Int sr="arg0" val="0"/>
</State>
</Profile>
<Task sr="task59">
<cdate>1467193837614</cdate>
<edate>1489288715313</edate>
<id>59</id>
<nme>Read Email</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>559</code>
<Str sr="arg0" ve="3">Email from: %aqmfrom Subject: %aqmsubject</Str>
<Str sr="arg1" ve="3">com.google.android.tts:eng-usa</Str>
<Int sr="arg2" val="3"/>
<Int sr="arg3" val="5"/>
<Int sr="arg4" val="5"/>
<Int sr="arg5" val="1"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
</Action>
</Task>
</TaskerData>
So instead of the person & subject, Tasker just reads literally "%aqmfrom"... instead of the actual variable.
The Shouter app does this but I would like to do it through Tasker!
Any suggestions gratefully received.
Many thanks
Cheers

[How-To] Add AdAway Enabled/Disable button to quick settings pane

Thread is a work in progress. Started the draft on my phone. Please wait a bit before flooding with complaints
Oftentimes I find myself wanting to use Google shopping or Slickdeals. However, AdAway host file often block these links. Although I can whitelist a select # of links, it virtually breaks adblocking everywhere, since many apps and website use the same ad services.
So I created this task that allows me to quickly enable/disable AdAway from quick settings. This is independent from the AdAway app and you don't need to have the AdAway app. It does however, use AdAway online repro to produce the same result.
What is needed:
Root (if you use systemless root, like MagiskSU, ensure that you enable systemless host in the settings)
Tasker
QuickTask
(free app in the play store)
Step 1, create the quick task button: Open QuickTask and create a button called AdAway (self explanatory)
Step 2, create the Tasker task and profile:
Import the XML from the code below or from the attached XML file below
Code:
Code:
<TaskerData sr="" dvi="1" tv="5.0u3m">
<Profile sr="prof9" ve="2">
<cdate>1496602694841</cdate>
<edate>1503239398635</edate>
<id>9</id>
<mid0>11</mid0>
<nme>AdAway QS</nme>
<Event sr="con0" ve="2">
<code>1565789502</code>
<pri>0</pri>
<Bundle sr="arg0">
<Vals sr="val">
<com.balda.quicktask.extra.EVENTS>0</com.balda.quicktask.extra.EVENTS>
<com.balda.quicktask.extra.EVENTS-type>java.lang.Integer</com.balda.quicktask.extra.EVENTS-type>
<com.balda.quicktask.extra.INT_VERSION_CODE>30</com.balda.quicktask.extra.INT_VERSION_CODE>
<com.balda.quicktask.extra.INT_VERSION_CODE-type>java.lang.Integer</com.balda.quicktask.extra.INT_VERSION_CODE-type>
<com.balda.quicktask.extra.OPERATION>0</com.balda.quicktask.extra.OPERATION>
<com.balda.quicktask.extra.OPERATION-type>java.lang.Integer</com.balda.quicktask.extra.OPERATION-type>
<com.balda.quicktask.extra.TILES><StringArrayList sr=""><_arrlst_com.balda.quicktask.extra.TILES0>AdAway</_arrlst_com.balda.quicktask.extra.TILES0></StringArrayList></com.balda.quicktask.extra.TILES>
<com.balda.quicktask.extra.TILES-type>java.util.ArrayList</com.balda.quicktask.extra.TILES-type>
<com.twofortyfouram.locale.intent.extra.BLURB>AdAway</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%qtname
Tile name
Name of tile pressed</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1>%qtevent
Tile name
Event: tap or double tap</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2>%qtstatus
Current tile status
It can be: Enabled, Disabled</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.balda.quicktask</Str>
<Str sr="arg2" ve="3">com.balda.quicktask.ui.QueryTileActivity</Str>
</Event>
</Profile>
<Task sr="task11">
<cdate>1496603118566</cdate>
<edate>1503239398635</edate>
<id>11</id>
<nme>AdAway</nme>
<Action sr="act0" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%qtstatus</lhs>
<op>2</op>
<rhs>Disabled</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act1" ve="7">
<code>548</code>
<Str sr="arg0" ve="3">Enabling AdAway</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act10" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">echo "127.0.0.1 localhost
::1 localhost" >> /etc/hosts</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act11" ve="7">
<code>548</code>
<Str sr="arg0" ve="3">AdAway Disabled</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act12" ve="7">
<code>38</code>
</Action>
<Action sr="act2" ve="7">
<code>508779925</code>
<Bundle sr="arg0">
<Vals sr="val">
<com.balda.quicktask.extra.IMAGE>check_bookmark</com.balda.quicktask.extra.IMAGE>
<com.balda.quicktask.extra.IMAGE-type>java.lang.String</com.balda.quicktask.extra.IMAGE-type>
<com.balda.quicktask.extra.INT_VERSION_CODE>31</com.balda.quicktask.extra.INT_VERSION_CODE>
<com.balda.quicktask.extra.INT_VERSION_CODE-type>java.lang.Integer</com.balda.quicktask.extra.INT_VERSION_CODE-type>
<com.balda.quicktask.extra.OPERATION>3</com.balda.quicktask.extra.OPERATION>
<com.balda.quicktask.extra.OPERATION-type>java.lang.Integer</com.balda.quicktask.extra.OPERATION-type>
<com.balda.quicktask.extra.STATE>0</com.balda.quicktask.extra.STATE>
<com.balda.quicktask.extra.STATE-type>java.lang.Integer</com.balda.quicktask.extra.STATE-type>
<com.balda.quicktask.extra.TILE>AdAway</com.balda.quicktask.extra.TILE>
<com.balda.quicktask.extra.TILE-type>java.lang.String</com.balda.quicktask.extra.TILE-type>
<com.twofortyfouram.locale.intent.extra.BLURB>Change image AdAway</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>com.balda.quicktask.extra.IMAGE</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>java.lang.String</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.balda.quicktask</Str>
<Str sr="arg2" ve="3">com.balda.quicktask.ui.FireTileImageActivity</Str>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act3" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">wget -O /sdcard/tasker/adblock/adaway.txt http://adaway.org/hosts.txt;
wget -O /sdcard/tasker/adblock/mvps.txt http://winhelp2002.mvps.org/hosts.txt;
wget -O /sdcard/tasker/adblock/hphosts.txt http://hosts-file.net/.%5Cad_servers.txt;
wget -O /sdcard/tasker/adblock/yoyos.txt http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext;</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act4" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">sort -u /sdcard/tasker/adblock/*.txt > /etc/hosts</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act5" ve="7">
<code>548</code>
<Str sr="arg0" ve="3">AdAway Enabled</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act6" ve="7">
<code>43</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%qtstatus</lhs>
<op>2</op>
<rhs>Enabled</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act7" ve="7">
<code>548</code>
<Str sr="arg0" ve="3">Disabling AdAway</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act8" ve="7">
<code>508779925</code>
<Bundle sr="arg0">
<Vals sr="val">
<com.balda.quicktask.extra.IMAGE>check_bookmark_black</com.balda.quicktask.extra.IMAGE>
<com.balda.quicktask.extra.IMAGE-type>java.lang.String</com.balda.quicktask.extra.IMAGE-type>
<com.balda.quicktask.extra.INT_VERSION_CODE>31</com.balda.quicktask.extra.INT_VERSION_CODE>
<com.balda.quicktask.extra.INT_VERSION_CODE-type>java.lang.Integer</com.balda.quicktask.extra.INT_VERSION_CODE-type>
<com.balda.quicktask.extra.OPERATION>3</com.balda.quicktask.extra.OPERATION>
<com.balda.quicktask.extra.OPERATION-type>java.lang.Integer</com.balda.quicktask.extra.OPERATION-type>
<com.balda.quicktask.extra.STATE>1</com.balda.quicktask.extra.STATE>
<com.balda.quicktask.extra.STATE-type>java.lang.Integer</com.balda.quicktask.extra.STATE-type>
<com.balda.quicktask.extra.TILE>AdAway</com.balda.quicktask.extra.TILE>
<com.balda.quicktask.extra.TILE-type>java.lang.String</com.balda.quicktask.extra.TILE-type>
<com.twofortyfouram.locale.intent.extra.BLURB>Change image AdAway</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>com.balda.quicktask.extra.IMAGE</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>java.lang.String</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.balda.quicktask</Str>
<Str sr="arg2" ve="3">com.balda.quicktask.ui.FireTileImageActivity</Str>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act9" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">truncate -s0 /etc/hosts</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
</Task>
</TaskerData>
Step 3, enjoy
Great one!
However why use QuickTask when you can use Tasker's integrated QS? Tasker > Preferences to define them.
Im_Mattgame said:
Great one!
However why use QuickTask when you can use Tasker's integrated QS? Tasker > Preferences to define them.
Click to expand...
Click to collapse
I am a newbie when speaking about tasker... I cannot get the integrated QS to work. I mean, I can link the task to the toggle button in the quick setting, but nothing happens.
If I test the task directly in tasker everything works.....
Can someone explain how to do a simple toggle task with the integrated QS? Or point me in a tutorial direction...
Thank you all
Fabio
friboli said:
I am a newbie when speaking about tasker... I cannot get the integrated QS to work. I mean, I can link the task to the toggle button in the quick setting, but nothing happens.
If I test the task directly in tasker everything works.....
Can someone explain how to do a simple toggle task with the integrated QS? Or point me in a tutorial direction...
Thank you all
Fabio
Click to expand...
Click to collapse
Doesn't work for me neither however I already have autonotification, how can I use this with that? Thanks
A step by step tutorial for a complete tasker noob please.
I created the QS tile but couldn't do the tasker part like importing the XML and stuff. Please Help! ?
What do I do with the XML? I am quite new to tasker so can someone please explain how to use the XML!!
PuiPuiTuiPui said:
What do I do with the XML? I am quite new to tasker so can someone please explain how to use the XML!!
Click to expand...
Click to collapse
This is a profile XML so you need to import it under profiles.
To do this, follow these steps:
Starting from the main menu:
Three-dot menu > Preferences > UI > Beginner Mode (disable - untick)
Go back to main menu pressing the back arrow
Long press the "PROFILES" tab
Select "Import"
Navigate to the downloaded XML file
Hey there.
I recently discovered this thread to quickly toggle adaway.
My only problem is that tasker doesn't download the hosts.txt from adaway.org.
The other two files get downloaded correctly but the download from adaway.org sometimes gives me a handshake failure or just nothing, but a hosts.txt never appears in the adblock folder.
Do you got any ideas on that? I already tried HTTP GET instead. But no luck with that, too.
Cheers,
Xerx
#edit: it does work with HTTP GET if I use the https source. Now I have to figure out why MagiskSU doesn't activate the systemless hosts file. ads still pop up...
#edit2: recreated the whole thing manually (without downloading the xml) and now everything works as expected. [Don't ask my why. I'm just happy.]
Thank you for this awesome method to quickly toggle AdAway
Uhh......Wouldn't this require a reboot for changes to take effect?
Xerx3sHipe said:
#edit2: recreated the whole thing manually (without downloading the xml) and now everything works as expected. [Don't ask my why. I'm just happy.]
Thank you for this awesome method to quickly toggle AdAway
Click to expand...
Click to collapse
Does the AdAway hosts file line still look like this?
Code:
wget -O /sdcard/tasker/adblock/adaway.txt https://adaway.org/hosts.txt
I have tried separating the wget commands into their own Actions, and only this still fails with "Error: 1", however the other three are definitely writing (although I'm having this issue with another hosts file I put in myself). It still happens if I put it in its own Task, with no other actions.
---------- Post added at 11:29 PM ---------- Previous post was at 11:23 PM ----------
Stupifier said:
Uhh......Wouldn't this require a reboot for changes to take effect?
Click to expand...
Click to collapse
It doesn't seem like it. I can't get the enabling through the tile to work correctly, but once its disabled like this and I re-enable ad blocking through AdAway, it seems to work after a couple of minutes, but may require restarting apps that already have the ads loaded.
DarkusRattus said:
Does the AdAway hosts file line still look like this?
I have tried separating the wget commands into their own Actions, and only this still fails with "Error: 1", however the other three are definitely writing (although I'm having this issue with another hosts file I put in myself). It still happens if I put it in its own Task, with no other actions.
Click to expand...
Click to collapse
No, I replaced the wget command with http get lines:
Code:
A3: HTTP Get [ Server:Port:[url]https://adaway.org/hosts.txt[/url] Pfad: Attribute: Cookies: User Agent: Timeout:10 MIME Typ: Ausgabe Datei:Tasker/adblock/hosts.txt Trust Any Certificate:Aus ]
A4: HTTP Get [ Server:Port:[url]https://hosts-file.net/ad_servers.txt[/url] Pfad: Attribute: Cookies: User Agent: Timeout:10 MIME Typ: Ausgabe Datei:Tasker/adblock/ad_servers.txt Trust Any Certificate:Aus ]
A5: HTTP Get [ Server:Port:[url]https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext[/url] Pfad: Attribute: Cookies: User Agent: Timeout:10 MIME Typ: Ausgabe Datei:Tasker/adblock/yoyos.txt Trust Any Certificate:Aus ]
DarkusRattus said:
Does the AdAway hosts file line still look like this?
Code:
wget -O /sdcard/tasker/adblock/adaway.txt https://adaway.org/hosts.txt
I have tried separating the wget commands into their own Actions, and only this still fails with "Error: 1", however the other three are definitely writing (although I'm having this issue with another hosts file I put in myself). It still happens if I put it in its own Task, with no other actions.
---------- Post added at 11:29 PM ---------- Previous post was at 11:23 PM ----------
It doesn't seem like it. I can't get the enabling through the tile to work correctly, but once its disabled like this and I re-enable ad blocking through AdAway, it seems to work after a couple of minutes, but may require restarting apps that already have the ads loaded.
Click to expand...
Click to collapse
I have improved the code, my new thread can be found here: https://forum.xda-developers.com/an...appfactory-t3749207/post75557345#post75557345
Xerx3sHipe said:
No, I replaced the wget command with http get lines:
Code:
A3: HTTP Get [ Server:Port:[url]https://adaway.org/hosts.txt[/url] Pfad: Attribute: Cookies: User Agent: Timeout:10 MIME Typ: Ausgabe Datei:Tasker/adblock/hosts.txt Trust Any Certificate:Aus ]
A4: HTTP Get [ Server:Port:[url]https://hosts-file.net/ad_servers.txt[/url] Pfad: Attribute: Cookies: User Agent: Timeout:10 MIME Typ: Ausgabe Datei:Tasker/adblock/ad_servers.txt Trust Any Certificate:Aus ]
A5: HTTP Get [ Server:Port:[url]https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext[/url] Pfad: Attribute: Cookies: User Agent: Timeout:10 MIME Typ: Ausgabe Datei:Tasker/adblock/yoyos.txt Trust Any Certificate:Aus ]
Click to expand...
Click to collapse
Just saw this... I wish I would have seen it before I went breaking my head and figuring this out on my own.
So you need to restart the phone after disabling the adblocker?

How to Remove the "Calls will be made over Wi-Fi" Notification

For Android 8.0+ :
1. First, download AutoNotification
2. Then, open the app and under "Standalone Features" tap "Notification Blocking"
3. Now tap the plus in the upper right and search for "calling"
4. An app called "Wi-Fi Calling" will show up. Tap it. Next a box that says "All Fields Optional" will show up. Just tap OK.
There! You're done! The notification won't show up again unless you remove it from that list and restart your phone!
This method works for any app including the Wi-Fi Calling app. It does not keep the app from running, which means Wi-Fi calling will still work fine while the notification is blocked.
For Android Under 8.0 :
All that needs to be done is force stopping the wifi calling package when you connect to wifi. The package restarts automatically (but does not send the notification again) and I've tested that wifi calling and texting will work fine while using this profile. If wifi disconnects and reconnects the notification will show up again, so the profile stops the package everytime you connect to a network.
The profile will wait 6 seconds after connection to wifi to stop the package (and get rid of the notification) as this is how long it takes for the notification to show up on my phone after I connect to wifi. If the profile doesn't work try tweaking this time to a longer amount of seconds.
Here's the XML for the profile:
HTML:
<TaskerData sr="" dvi="1" tv="5.1m">
<Profile sr="prof11" ve="2">
<cdate>1518069433891</cdate>
<edate>1518070561772</edate>
<id>11</id>
<mid0>10</mid0>
<nme>Stop wifi calling notif</nme>
<State sr="con0" ve="2">
<code>160</code>
<Str sr="arg0" ve="3"/>
<Str sr="arg1" ve="3"/>
<Str sr="arg2" ve="3"/>
<Int sr="arg3" val="0"/>
</State>
</Profile>
<Task sr="task10">
<cdate>1518069188395</cdate>
<edate>1518070421848</edate>
<id>10</id>
<nme>Stop wifi</nme>
<Action sr="act0" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="6"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act1" ve="7">
<code>465073209</code>
<Bundle sr="arg0">
<Vals sr="val">
<com.mobizsystems.mdm.tasker.key>3</com.mobizsystems.mdm.tasker.key>
<com.mobizsystems.mdm.tasker.key-type>java.lang.Integer</com.mobizsystems.mdm.tasker.key-type>
<com.mobizsystems.mdm.tasker.packages><StringArrayList sr=""><_arrlst_com.mobizsystems.mdm.tasker.packages0>com.samsung.tmowfc.wfcpref</_arrlst_com.mobizsystems.mdm.tasker.packages0><_arrlst_com.mobizsystems.mdm.tasker.packages1>com.samsung.tmowfc.wfccontroller</_arrlst_com.mobizsystems.mdm.tasker.packages1></StringArrayList></com.mobizsystems.mdm.tasker.packages>
<com.mobizsystems.mdm.tasker.packages-type>java.util.ArrayList</com.mobizsystems.mdm.tasker.packages-type>
<com.twofortyfouram.locale.intent.extra.BLURB>Force Stop 2 packages</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.mobizsystems.mdm</Str>
<Str sr="arg2" ve="3">com.mobizsystems.mdm.ForceStopActivity</Str>
<Int sr="arg3" val="0"/>
</Action>
</Task>
</TaskerData>

[Tasker Help] - Call Forwarding Profile

Hi
I was hoping i could get some help from someone with a profile i'd like to setup to forward my calls when conntected to my home wifi
This i can setup, but i also need to make sure tasker only runs the call forward dial code **21*+44.... after 5 minutes of connecting to the wifi and doesn't run the cancel code ##21# unless the wifi has been disconnected for more than 5 mins.
If call forwading was active and the wifi was disconnected i want to make sure the cancel option is stopped if wifi is restored within the 5 mins and vice versa.
Has anyone setup something like this before that i could replicate?
The basic idea would be a profile context, WiFi connected.
Enter task has a 5 minute wait action then the call action with the forward code and then a variable set %Forward to true. The call action should have an if statement set such; %Forward does not match true. This will prevent a second forward code being sent if the cancel code has not been sent.
Exit task has a 5 minute wait action then a call action with the cancel code and finally a clear variable for %FORWARD. In the call action, use an if statement; %WIFII does not match *CONNECTION*xxxxx* (where xxxxx is the SSID of the WiFi network that is in the profile context) around the final 2 actions so they don't run if the WiFi is reconnected.
If you flash the %WIFII variable, when connected you see information stating that WiFi is connected (CONNECTION) and what network it's connected to. If WiFi is not connected the %WIFII variable will return SCAN and all of the networks available. So the exit task will only run if the WiFi had not reconnected.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Wifi Call Forwarding
Hi,
Thanks for your help, based on your instructions i created the following profile but i may have made a mistake because even if the wifi is reconnected (i set it to 20 secs for testing) before 20 seconds the erasure code for call forwarding still runs and then the call forward code runs along with it if the wifi was restored.
Can you please have a look and let me know what i did wrong.
<TaskerData sr="" dvi="1" tv="5.2.bf1">
<Profile sr="prof29" ve="2">
<cdate>1531430225115</cdate>
<edate>1532630932692</edate>
<flags>16</flags>
<id>29</id>
<limit>true</limit>
<mid0>27</mid0>
<mid1>28</mid1>
<nme>Call Forward</nme>
<State sr="con0" ve="2">
<code>160</code>
<Str sr="arg0" ve="3">wg-OFFICE</Str>
<Str sr="arg1" ve="3"/>
<Str sr="arg2" ve="3"/>
<Int sr="arg3" val="0"/>
</State>
</Profile>
<Task sr="task27">
<cdate>1531429517251</cdate>
<edate>1532623660702</edate>
<id>27</id>
<nme>1</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="20"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act1" ve="7">
<code>90</code>
<Str sr="arg0" ve="3">**21*+447953222222#</Str>
<Int sr="arg1" val="1"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%Forward</lhs>
<op>3</op>
<rhs>%TRUE</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act2" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%Forward</Str>
<Str sr="arg1" ve="3">%TRUE</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
</Task>
<Task sr="task28">
<cdate>1531429582522</cdate>
<edate>1532623613278</edate>
<id>28</id>
<nme>2</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="20"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act1" ve="7">
<code>90</code>
<Str sr="arg0" ve="3">##21#</Str>
<Int sr="arg1" val="1"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%WIFII</lhs>
<op>3</op>
<rhs>wg-OFFICE</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act2" ve="7">
<code>549</code>
<Str sr="arg0" ve="3">%Forward</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="0"/>
</Action>
</Task>
</TaskerData>
ktmom said:
The basic idea would be a profile context, WiFi connected.
Enter task has a 5 minute wait action then the call action with the forward code and then a variable set %Forward to true. The call lactose should have an if statement set such; %Forward does not match true. This will prevent a second forward code being sent if the cancel code has not been sent.
Exit task has a 5 minute wait action then a call action with the cancel code and finally a clear variable for %FORWARD. In the call action, use an if statement; %WIFII does not match *CONNECTION*xxxxx* (where xxxxx is the SSID of the WiFi network that is in the profile context) around the final 2 actions so they don't run if the WiFi is reconnected.
If you flash the %WIFII variable, when connected you see information stating that WiFi is connected (CONNECTION) and what network it's connected to. If WiFi is not connected the %WIFII variable will return SCAN and all of the networks available. So the exit task will only run if the WiFi had not reconnected.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Click to expand...
Click to collapse
Go to the 3-dot menu and select export -> Description to Clipboard (not XML). Then you'll be able to paste it.
Be aware, it easier to use pastebin then link to a post here. If you paste in a post here, the forum software will convert all semicolons with characters after, typically "on" and "off" to emoticons making it very hard to read.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Wifi Call Forwarding
Sure, please see below. Since I havn't posted 10 times yet i can't post urls
pastebin/p4Ne08bu
Thanks!
ktmom said:
Go to the 3-dot menu and select export -> Description to Clipboard (not XML). Then you'll be able to paste it.
Be aware, it easier to use pastebin then link to a post here. If you paste in a post here, the forum software will convert all semicolons with characters after, typically "on" and "off" to emoticons making it very hard to read.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Click to expand...
Click to collapse
There are three things that need to be addressed.
Long press the profile name so it’s highlighted, then tap the gear icon at the top. Check the box for “enforce order”. That is checked by default so somewhere along the line it was toggled off. The “i” next to the box will explain what it does.
In the entry task, action 3 sets the variable “%Forward” to another variable “%TRUE” (which is probably uninitialized e.g. not set) . Remove the % from the “TRUE” so “%Forward” is set to a value. Then fix the same problem in action 2.
In the exit task, action 2 the If statement for dialing the cancel code you have as “%WIFII !~ wg-OFFICE”. If you look at %WIFII when connected and disconnected but proximate to the AP, you’ll see that the SSID “wg-OFFICE” is present in both cases. To view the value of %WIFII, in a blank task, create an alert->flash with %WIFII as the text. Then just play the task when connected to the wifi network and again when disconnected.
There is also other text in the variable “%WIFII” in both cases. Since matches (~) or does not match (! ~) is not the same as contains, you have to allow for the additional text plus, ensure that it matches only when actually connected. That’s why my original post recommended the comparison be to “*CONNECTION*xxxxx* (where xxxxx is the SSID of the WiFi network”. So, in your case, this should be “*CONNECTION*wg-OFFICE*”. The asterisks are wildcards so this pattern ensures the match occurs only when there is a connection to the wg-Office AP.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Thanks! I'll give this a try.

Categories

Resources