(Guide) Lost Phone Protocol - Tasker Tips & Tricks

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.

Related

Vibrate on connect not working

Hello can you help me how to enable this function again? It stopped working unexpectedly but I can't tell for what reason... I asked my friend with Touch Pro how to disable/enable and he sent me this:
Open the dial pad > press menu > options > advanced > and tick -> vibrate device when connection is established
the problem is i don't have advanced tab in this menu (and yes, I clicked those little arrows)
tnx for your time and help
having same problem

Toggle Settings Based On Day/Night

hi, my phone is rooted and ive got secure settings installed, i would like to do the following
At Home
wifi on
auto sync off
display autorotate on
gps off
airplane mode off
mobile data off
enable 2g only
away from home
auto sync on
gps on
mobile data on
enable 2g/3g/4g
Night
Wifi off
Airplane mode on
mobile data off
Task - Night On
Action > Plugin > Secure Settings > Root Actions > Airplane Mode > On
Task - Night Off
Action > Plugin > Secure Settings > Root Actions > Airplane Mode > Off
Task - Night
If %NIGHT eq 1
Variable Set > Name %NIGHT to 0
Set Widget Icon > Name Night > Icon (choose the icon that you like)
Set Widget Label > Name Night > Label Day
Else
Variable Set > Name %NIGHT to 1
Set Widget Icon > Name Night > Icon (choose the icon that you like, different from the previous icon)
Set Widget Label > Name Night > Label Night
End if
Then create a Task Widget in your homescreen and choose the task Night
This icon in your homescreen will let you toggle between Day and Night mode.
For the other part I would use AutoLocation.
Herdkilling said:
Task - Night On
Action > Plugin > Secure Settings > Root Actions > Airplane Mode > On
Task - Night Off
Action > Plugin > Secure Settings > Root Actions > Airplane Mode > Off
Task - Night
If %NIGHT eq 1
Variable Set > Name %NIGHT to 0
Set Widget Icon > Name Night > Icon (choose the icon that you like)
Set Widget Label > Name Night > Label Day
Else
Variable Set > Name %NIGHT to 1
Set Widget Icon > Name Night > Icon (choose the icon that you like, different from the previous icon)
Set Widget Label > Name Night > Label Night
End if
Then create a Task Widget in your homescreen and choose the task Night
This icon in your homescreen will let you toggle between Day and Night mode.
For the other part I would use AutoLocation.
Click to expand...
Click to collapse
thanks, I'll try autolocation, would night work if I just a time context
You can create a new task with a time context to set the %NIGHT variable to 1 (on) and 0 (off).
In my case, I have a toggle icon in home of my homescreens and another task that sets the %NIGHT variable when the phone is upside down and charging, so when I go to sleep, all I have to do is connect the charger and leave it upside down.
The good thing about the toggle icon, is that you may toggle night mode manually whenever you want.
thanks
I would use MeteoTask in order to create a day/night condition according to sunset and sunrise times.

[PROJECT] Automactically Switch between 12hr/24hr on WatchMaker (Android Wear)

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! ^^

[Tutorial] Send Scheduled Group SMS (with Second Sim)

If you only have one SIM then you can use
Task-> Phone -> Send SMS
For sending message from second SIM read below
.Make a new profile with Event time.
Click new Task.
#1
Select System -> Send Intent
In the Send intent do the following settings.
Action -> android.intent.action.VIEW
Data -> sms: xxxxxx,xxxxxx,... (Separate numbers by comma)
Extra -> sms_body: your_text
Target -> Activity
# 2
Select -> Plugins -> AutoInput -> Action
In the AutoInput do the following settings
Click on the pencil button to do the configuration
Here you can select the easy setup option and follow screen instructions or do the following
Action -> Click
Field Type -> text
Field Text -> Send via Card 2
#3
Select -> App -> Go Home
Keep default settings.
That's it.
You can also add event Day along with Time so that the schedule stuff goes on specific day and time

[GUIDE] Add sound/vibrate toggle tile in quick settings

In many devices with Android 7.x, there is no tile in quick settings to toggle the vibrate/sound mode. In my opinion, it's too bad. With Tasker, we can add a tile to toggle sound/vibrate mode in quick settings.
Introduced in Android 7.0, the quick settings tiles API allows access to specific actions or settings of an app. It wasn’t until the release of Tasker v5.0 that these tiles became a native feature. Located in the preferences menu under the Action tab, there are 3 slots for Quick Settings Tasks. Clicking the magnifying glass icon opens a menu with Named Tasks to add in any of the three slots.
Prerequisites
Android 7.x
Tasker 5.x+
Please see screenshots below
Adding a quick settings task (tile)
Swipe down to expand the notification shade.
Click on the pencil icon to edit the quick settings tiles and locate the Tasker tiles.
Drag the first one "toggle" to the top, to add it to the notification panel for use.
Instructions
Create a new task and name it: ToggleSound
Select an icon for this task as a speaker: Icon > Holo > Speaker
Open the task and create the entry task:
1. Task > If: %SILENT ~ off
2. Audio > Sound Mode > Vibrate
3. Tasker > Setup Quick Setting > Number: 1, Name: ToggleSound, Status: Inactive
4. Task > Else
5. Audio > Sound Mode > Sound
6. Alert > Vibrate > Time: 50, Continue Task After Error: Yes
7. Tasker > Setup Quick Setting > Number: 1, Name: ToggleSound, Status: Active
8. Task > End If
9. Input > Close System Dialog
Setup quick settings tasks action
Tasker > Preferences > Quick Settings Tasks > Set to the first one the task created: ToggleSound
This tile is usefull for devices without tile to toggle sound/vibrate mode, as Moto series and LineageOS 14.

Categories

Resources