What's new
DroidForums.net | Android Forum & News

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

What have YOU done with Tasker?

This thread made me register, thank you for all your profiles/tasks for Tasker :) Great job.

I'm really beginner and i'm really having trouble creating my own tasks, maybe someone could help me.

So here's my case:
I go to my work by bus and often i fall asleep and miss my stop which then takes me half an hour to get back where i'm supposed to :(
So i'm trying to make a task that in time window let's say between 7:00 and 8:00 AM to check location cell towers, network, gps every minute and if i'm in range of whatever say 500m radius or near a cell tower to alert me with all possible options like vibrate, alarm, ring, slap, kick...

I would appreciate any help

Thanks :D
 
This thread has been invaluable. Thanks to everyone who has helped contribute. I apologize ahead of time for this ridiculous wall of text.

Here is the bottom line of what I could like tasker to do: Upon receipt of an email (could also settle for SMS message-doesn’t matter) from a certain sender, I’d like to extract a certain portion of text (in this case, a physical address/location) and have it auto-load/auto-search it in Maps.

Here is the background to give you a better point of reference: I work in EMS and receive dispatch information for 911 calls on my droid 2 via email and SMS (in addition to receiving the call on the radio oftch information for 911 calls on my droid 2 via email and SMS (in addition to receiving the call on the radio, of course). The SMS / email I receive contains (among other information) the address that I need to respond to. I want the address to auto-load in Maps upon receipt of the SMS.

Sounds easy enough right? Just setup a context of “Received Text” with the dispatch email address listed as the sender (or receipt of email from the same using the K9 Mail event context and just set K9 Mail ), and set actions to
1) Set Clipboard to %SMSRB (that’s the SMS body variable)
2) Open Map (under Select App Action) and set the address field to %CLIP (clipboard contents variable)

The problem that I can’t seem to work around (yet) is that the SMS message contains a lot information other than just the address (incident #, nature of the emergency, EMS district, etc.) Simply having tasker copy the body of the SMS doesn’t work because Maps can’t extract the address out of the rest of the “junk” in the message. I have no control over the information/ text that the SMS contains.

Does anyone know of a way (within tasker or otherwise) that I can auto-extract just the address so that Maps can successfully search?

Pasted below is a sample SMS I received earlier today (I changed the address to something generic). In case its helpful to anyone willing to help me solve this…the address ALWAYS begins as the 15 th character of the message (and always comes after the letters “hrs”-denotes the time). The address will always end as “RD” or “DR” or “LN” or “AVE” or “PKWY”. The end of the address is ALWAYS followed by the letters “fd”-it stands for fire district. See the sample SMS below and it should make more sense. Thanks for reading.

C9683 1242hrs 512 KENAR TOP RD fd:08 re:OVERDOSE//Is the patient conscious?: No //Is the patient breathing normally?: Yes //Is the patient violent (218)?: no // ALS: Y sendFire: Y//(CAD)

In case its relevant, I have a rooted Droid 2, Android 2.2 firmware, and running the Fission 2.3 ROM.

Sent from my DROID2 using DroidForums App
 
You need to split the message in 2 steps to parse address out of it.

First split with RED SPLITTER 2'nd split with BLUE SPLITTER

C9683 1242hrs 512 KENAR TOP RD fd:08 re:OVERDOSE//Is the patient conscious?: No //Is the patient breathing normally?: Yes //Is the patient violent (218)?: no // ALS: Y sendFire: Y//(CAD)



1: SET Variable %FULLSTR to %SMSRB

2: SPLIT Variable %FULLSTR with splitter "hrs " (Without quotes)
[Now You have C9683 1242 set in variable %FULLSTR1]
[rest of the message in variable %FULLSTR2]

3: SPLIT Variable %FULLSTR2 with splitter " fd:" (Without quotes)
[Now address should be set in Variable %FULLSTR21]

Variable %FULLSTR21 should be what You need
 
Last edited:
NebulaOcton can definitely clarify but I suspect you need to replace the / with an OR. You want the context to be if either variable is set to 1.

Tasks should be included in the Profile that they are posted under. You're basically telling Tasker "If this context's conditions are met, then carry out these tasks". See if this formatting makes any more sense:

First Profile
  • Context
    • Phone Ringing
  • Task
    • Set %PHONERINGING to 1
    • Wait 30 Seconds
    • Set%PHONERINGING to 0
Second Profile
  • Context
    • Text Received
  • Task
    • Set %TEXTRCVD to 1
    • Wait 30 Seconds
    • Set %TEXTRCVD to 0
Third Profile
  • Context
    • %PHONERINGING/%TEXTRCVD matches 1
    • Headphones plugged in
  • Task
    • End Call if %PHONERINGING matches 1
    • Send text message(pick what you want it to say) to %CNUM if %PHONERINGING matches 1
    • Send text message to %SMSRF if %TEXTRCVD matches 1
    • Say Text Sent

This doesn't work. Tried it several times, several ways. It does not send texts for either call or sms.

Sent from my DROID2 using DroidForums App

Ok here we go

New - Type: Phone Ringing - Ok - Event - Phone - Phone Ringing - Priority Highest - Done - New Task - Ok
"+" - Variable - Variable Set - %PHONERINGING to 1 - Done
"+" - Tasker - Wait - 30 Seconds - Done
"+" - Variable - Variable Set - %PHONERINGING to 0 - Done - Done

New - Type: Text Received - Ok - Event - Phone - Received Text - Priority Highest - Done - New Task - Ok
"+" - Variable - Variable Set - %TEXTRCVD to 1 - Done
"+" - Tasker - Wait - 30 Seconds - Done
"+" - Variable - Variable Set - %TEXTRCVD to 0 - Done - Done

New - Type: Headphone Phonecall - Ok - State - Variable Value - %PHONERINGING matches 1 - Done - New Task - Ok
"+" - Phone - End Call - Done
"+" - Phone - Send SMS - Number: %CNUM - Message: (whatever you want) - Done
"+" - Media - Media Control - CMD: Pause - Simulate Media Button - Done
"+" - Misc - Say - Text Sent - Done
"+" - Tasker - Wait - 5 Seconds - Done
"+" - Media - Media Control - CMD: Play - Simulate Media Button - Done - Done
Add context - State - Headset Plugged - Done

New - Type: Headphone Text RCVD - Ok - State - Variable Value - %TEXTRCVD matches 1 - Done - New Task - Ok
"+" - Phone - Send SMS - Number: %SMSRF - Message: (whatever you want) - Done
"+" - Media - Media Control - CMD: Pause - Simulate Media Button - Done
"+" - Misc - Say - Text Sent - Done
"+" - Tasker - Wait - 5 Seconds - Done
"+" - Media - Media Control - CMD: Play - Simulate Media Button - Done - Done
Add context - State - Headset Plugged - Done


I thought I could combine the last two profiles but I couldn't. Let me know if this works.
 
In your preferences under monitor change your wifi scan seconds to 25 and your wifi minimum timeout to 10 seconds. And try it again. You should see it toggle faster this way, maybe were just missing it. Also don't trust your power widget to be accurate, I've noticed mine hanging up a lot. If you are using a rom with a toggle in the notification area, that seems to be more accurate.

Made these changes, killed the router...same result all works good unitl the 5 min are up and the wifi off profile disables itself leaving the home profile on, wifi turns back on and won't turn off until I leave my "home" range.

I just noticed these posts. Not sure if my issue is exactly the same, but my WiFi Off profile would also not turn off wifi. I put in a notify message with the same condition. I see the notify... wifi stays on.

As long as my Home profile was active (had been entered) it would eventually turn off. But on occasion, that profile wouldn't be entered an wifi would stay on until I manually turned it off.

I am actually using something different now, and my equivalent of WiFi Off doesn't use the WiFi Disconnected state. I trigger off of WIFIC changing to 0.

It's actually more complex than that. This is a very difficult thing to get working reliably. I've almost given up several times. If I have to continually check it, there isn't much point in having Tasker automate it.

But I think I may have a working set of profiles for a single location.

Can you write exactly what you did please?
 
This thread made me register, thank you for all your profiles/tasks for Tasker :) Great job.

I'm really beginner and i'm really having trouble creating my own tasks, maybe someone could help me.

So here's my case:
I go to my work by bus and often i fall asleep and miss my stop which then takes me half an hour to get back where i'm supposed to :(
So i'm trying to make a task that in time window let's say between 7:00 and 8:00 AM to check location cell towers, network, gps every minute and if i'm in range of whatever say 500m radius or near a cell tower to alert me with all possible options like vibrate, alarm, ring, slap, kick...

I would appreciate any help

Thanks :D

This shouldn't be too hard
I can modify the profile from the link above to do what you want. Hopefully I will have time today to write it up.
 
Doesn't work...my profiles are as follows:

[1] Event - Display On - Variable set %DISPLAYSTATUS to 1
[2] Event - Display Off - Variable set %DISPLAYSTATUS to 0
[3] Event - Button:Camera (Stop Event)
Variable Value - %DISPLAYSTATUS matches 1 Pop up menu of apps to open (this works fine)
[4] Event - Button:Camera (Stop Event)
Variable Value - %DISPLAYSTATUS matches 0 Display - Turn ON (this doesn't work)

Any ideas?
Ok so I set this up and am having the same issue. I set up a test app to see if the variable was changing and it is.

I found this
"Behaviour When Device Off

By default, after a few seconds of the screen being off Android will power down the device and thus running tasks will be paused.
In the Task Properties dialog, it can be specified that a task should keep running."

But I can't find the Task Property page which allows me to keep it running.


I found that page but it doesn't seem to make a difference. Time for me to run to class but I will look into it more tonight.

Hey just bumping something from a long time ago...were you ever able to figure this one out? I wanted to have the camera button wake up my phone when the display is off, but could never accomplish it...
 
Ok so I set this up and am having the same issue. I set up a test app to see if the variable was changing and it is.

I found this
"Behaviour When Device Off

By default, after a few seconds of the screen being off Android will power down the device and thus running tasks will be paused.
In the Task Properties dialog, it can be specified that a task should keep running."

But I can't find the Task Property page which allows me to keep it running.


I found that page but it doesn't seem to make a difference. Time for me to run to class but I will look into it more tonight.

Hey just bumping something from a long time ago...were you ever able to figure this one out? I wanted to have the camera button wake up my phone when the display is off, but could never accomplish it...

Sorry I left you in the wind. I did test this and then I tried again today. I couldn't get it to work till I had the keyguard off. So for this to work, keyguard will be disabled. That would leave your phone vulnerable if you were to lose it.

Just use the above code, it works, but you have to add keyguard off (under the display menu) to the Display on Event profile.

If you want you can set a timer up so that after a certain amount of time it engages the keyguard.
 
Is there a way to have tasker unlock the phone when say I plug the headphones in?

If I understand you correctly you want to plug the headphones in when the phone is asleep and have it wake up and unlock itself.

If you are running Android 2.2+ that can no longer be done.

But if your screen is on when you plug the headphones in, I can turn the keyguard off and that will allow you to skip a step when you want to play around with music controls or something like that.

Let me know what you want to do.
 
Yeah I was hoping for wake up and unlock. Its a bummer it can't be done.

What about a script? There is a plugin that will allow one to run a script (even with su) but I've never found any line of code or anything like that that would wake and unlock... Know anything like that?
 
Yeah I was hoping for wake up and unlock. Its a bummer it can't be done.

What about a script? There is a plugin that will allow one to run a script (even with su) but I've never found any line of code or anything like that that would wake and unlock... Know anything like that?

I don't because I don't write code. I have a very very limited software background.
 
Back
Top