[APP] Tasker: Share your setup

Search This thread

Adolf1994

Senior Member
Jun 2, 2010
411
65
Fertőrákos
Do anybody know about a task what enable the stock music("video") player on X10?
I need this, because my HAWX freeze if I play the intro video with Mediascape or other players :'(
I updated my phone, and Bin4ry told me I should use Tasker
Thanks in advance!
 

strictlyrude27

Senior Member
Jan 12, 2010
551
451
Seattle, WA
I'd like to enable GPS only when running Maps and Nav, and disable it otherwise. It's pretty easy to set this up, but here's a caveat:

I've got Handcent SMS installed and use the popup notification feature. I've noticed that when I'm in Nav and a text message comes in, it disables the GPS. Nav then complains that GPS signal is lost and offers to go to the settings page to turn it back on. If I just sit at that window it'll regain GPS signal but that popup won't go away - the only way to start using Nav again is to exit entirely and reenter.

Any ideas how to keep the GPS on when Nav is running at all (but not the foreground task)?

EDIT: I figured it out! It took a while since apparently closing the popup notification isn't considered exiting the app. Anyhow:

Profile 1
System Event: Received SMS *,* (receive from any sender, any message body).
Entrance Task: Variable Set %SMSRCV = on.

Profile 2
System Event: Variable set %SMSRCV == on
Entrance Task: Wait 3 seconds; variable set %SMSRCV = off

Profile 3
System Event: Navigation app
Entrance Task: GPS On
Exit Task: Stop if %SMSRCV == on; GPS Off. (Stop will kill the task immediately - think of a break() statement in C.)

So when you receive a text (profile 1), %SMSRCV gets set. Handcent SMS will pop up, putting Navigation in the background. Profile 3's exit task then prevents Navigator from shutting off the GPS, and profile 2 resets the flag to await a new text message.

Of course, the safest way to do this is to have the phone read you the text. Heh.

Hope this helps someone!
 
Last edited:

fubaya

Senior Member
Mar 20, 2010
251
28
This is an awesome app. I haven't had time to delve into it deeply yet, but here's what I have so far.

Turn on GPS when I open any of my GPS-using apps and close it when done.

Pop up a menu of all the apps I may want to use headphones with when the headphones are plugged in.

Run a couple scripts at boot using the "Locale Execute" plugin. It looks like this could be done natively with Tasker, but the scripts are in /system/bin, Tasker only works if they're on the sdcard and I don't want to junk up my sdcard.

I also use it to work with a couple scripts I run at home every 15 minutes. One sends a SMS if my home IP changes. I use tasker to take the new IP and put it in a file and call that file with any scripts I use to connect to my home computer. End result, I don't have to hard-code the IP and, if it ever changes, Tasker automatically updates it.

The second is a perl script for weather I got from somewhere else which takes a specified location, draws a custom sized box around, downloads radar data from weather.gov and can detect if there is any precipitation in that box. I set it up to run on a cron and send me an SMS if it goes from "clear" to "precipitaion detected." When that SMS comes in, I use Tasker to download a radar map from my local news station's website and display it. End result, any time rain gets within 10 miles of my house or work, I get a warning and can glance at the image to see what's up without opening a weather app.
 

crazyg0od33

Senior Member
Aug 10, 2010
1,019
107
I know this is probably the easiest task to set up, but I am having trouble getting my phone to turn on wifi when at my house. I have two profiles running, the first is set up with "wifi near"->my network->wifi turn on (wifi near is set to wifi toggle), and my second is wifi connected->(exit task)wifi off. The issue I am having is, whenever I shut my screen off, even at home, it shuts the profiles off. I cant seem to get them to reactivate in my notification tray. I tried to shut tasker off, then on again so it restarts, but it still wont activate the profile.
 

OrganizedFellow

Senior Member
May 9, 2009
630
17
EL Paso, TX
organizedfellow.com
I also use it to work with a couple scripts I run at home every 15 minutes. One sends a SMS if my home IP changes. I use tasker to take the new IP and put it in a file and call that file with any scripts I use to connect to my home computer. End result, I don't have to hard-code the IP and, if it ever changes, Tasker automatically updates it.

The second is a perl script for weather I got from somewhere else which takes a specified location, draws a custom sized box around, downloads radar data from weather.gov and can detect if there is any precipitation in that box. I set it up to run on a cron and send me an SMS if it goes from "clear" to "precipitaion detected." When that SMS comes in, I use Tasker to download a radar map from my local news station's website and display it. End result, any time rain gets within 10 miles of my house or work, I get a warning and can glance at the image to see what's up without opening a weather app.
SIMPLY EFF-ing INCREDIBLE!
:)

amazing how many uses Tasker has.
and I only use it to auto-update Facebook, ahaha.
 

crachel

Retired Senior Moderator
Jul 13, 2008
3,880
3,029
Texas
I also use it to work with a couple scripts I run at home every 15 minutes. One sends a SMS if my home IP changes. I use tasker to take the new IP and put it in a file and call that file with any scripts I use to connect to my home computer. End result, I don't have to hard-code the IP and, if it ever changes, Tasker automatically updates it.

Have you considered a router (dlink for example) that supports dynamic dns?

The second is a perl script for weather I got from somewhere else which takes a specified location, draws a custom sized box around, downloads radar data from weather.gov and can detect if there is any precipitation in that box. I set it up to run on a cron and send me an SMS if it goes from "clear" to "precipitaion detected." When that SMS comes in, I use Tasker to download a radar map from my local news station's website and display it. End result, any time rain gets within 10 miles of my house or work, I get a warning and can glance at the image to see what's up without opening a weather app.

anymore details you could give on this would be greatly appreciated!
 

fubaya

Senior Member
Mar 20, 2010
251
28
Have you considered a router (dlink for example) that supports dynamic dns?

I think my router could but it's never been that important. My IP only changes every few months and I can usually live without it until I get home anyway. Plus this way is free and simpler.

anymore details you could give on this would be greatly appreciated!

I should note, the perl script runs on the computer, not the phone. Reading my earlier post, I see I wasn't clear about that and hope I didn't ruin anyone's hopes.

Anyway, yeah, check out the link in my signature for my blog 'o' useless crap. That is halfway down on my most recent post. That post has the Tasker setup info, which is simple, and a link to another post I made last year about the perl script. It has a link to the author's page but let me know if you need any help. I only use Linux though and have no clue about anything when it comes to windows or mac.

I left the notification method up to the reader, but I use ATT and can send an email to PhoneNumber@txt.att.net and get it as an SMS on the phone. That's how I send the notification from my computer. Other carriers usually have a similar address.
 

LevitateJay

Senior Member
Dec 18, 2009
256
44
Hey does anybody know a way I can set a variable for everytime my music is playing? I'm trying to setup a conditional pause on a bluetooth profile but I can't find any reliable way to check if music is currently playing or not!
 

TurboTsi

Senior Member
Dec 3, 2007
258
17
Chicago
I know this is probably the easiest task to set up, but I am having trouble getting my phone to turn on wifi when at my house. I have two profiles running, the first is set up with "wifi near"->my network->wifi turn on (wifi near is set to wifi toggle), and my second is wifi connected->(exit task)wifi off. The issue I am having is, whenever I shut my screen off, even at home, it shuts the profiles off. I cant seem to get them to reactivate in my notification tray. I tried to shut tasker off, then on again so it restarts, but it still wont activate the profile.

I have this set up as a New --> Location, then in the task edit screen, I pressed the "+" button on the bottom left, selected Net and selected WiFi, set that to On and that was it. This works pretty good for me. When I leave my apartment it will detect it when it polls the gps and turns off the WiFi.
 

lionsson

Member
May 11, 2009
45
5
I found that turning WiFi on by location wasn't 100% reliable and it used more battery, so this profile is 100% reliable and it uses less battery.

This profile turns on WiFi every 4 minutes for 10 seconds and them disable it, but if connected to a know hotspot it will leave WiFi on until disconnect, once disconnected it will start the cycle again.

PROFILE 1 CONTEXT
State: Wifi Connected
ENTER TASK
WiFi On
Variable Set, %CON to 1
Flash text, WiFi Connected
EXIT TASK
Variable Clear, %CON
Flash text, WiFi Disconnected
Wait 2 seconds [If Not Set %WAIT]
WiFi Off [If Not Set %WAIT]
Flash text, Turning WiFi off [If Not Set %WAIT]

PROFILE 2 CONTEXT
Time: Repeat: 4 minutes (no From or To)
Variable Value: Not Set %CON
ENTER TASK
Variable Set, %WAIT to 1
Wifi On
Flash text, Checking for WiFi connection
Wait 10 seconds <---- your can add more if necessary
Wifi Off [If Not Set %CON] <----in case you connect during the 10 seconds
Flash text, No Wifi connection found [If Not Set %CON]
Variable Clear, %WAIT

If your N1 doesn't auto connect to your netwok this profile will not work for you.
The "Flash text" is optional, but if your new to tasker it help to flash what tasker is doing.
You can remove them once it's working for your. I tent to leave them on.
 
Last edited:

Webreaper

Senior Member
Mar 16, 2006
106
0
London
This profile turns on WiFi every 4 minutes for 10 seconds and them disable it, but if connected to a know hotspot it will leave WiFi on until disconnect, once disconnected it will start the cycle again.

Perfect! This is exactly what I want. I've found my N1 doesn't connect to my wifi reliably because of the bug in Froyo, so was about to write a Tasker script which loops round, disconnecting and connecting wifi until it successfully connects. But you've done the work for me.

I'll just put an if statement so this only gets run when I'm at home. :)
 

lionsson

Member
May 11, 2009
45
5
Check this out.
I use this Profile to connect to my car stereo via bluetooth.

 
Last edited:

strictlyrude27

Senior Member
Jan 12, 2010
551
451
Seattle, WA
i was curious if anyone would mind sharing how to be notified with the default notification sound ever minute if there's a missed call or sms event.

I would use one profile to set a flag upon missed call or SMS; another profile with your SMS or call log apps to reset that flag. Use a third profile to beep every minute while those flags are set.

Profile 1
Context: Event->Phone Event->Missed Call
Action: Variable->Variable Set->%MISSEDCALL to 1

Profile 2
Context: Application->Call Log
Action: Variable->Variable Clear -> %MISSEDCALL

Profile 3
Context: Variable Set->%MISSEDCALL
Actions: (1) Alert->Notify Sound-><your notification sound>. (2) Tasker->Wait 60 seconds

You'd make similar profiles for your SMS.

Note that this is untested and you likely will need to tweak this a bit as you see fit.
 
  • Like
Reactions: violet.tester128

-=HOLLYW00D=-

Member
Aug 16, 2010
47
2
Austin, TX
thanks strictlyrude27, i'll give it a shot. any idea why the following isn't working for me? i'm testing by calling my phone, from another, and hanging up. does absolutely nothing:

profile 1
Context: Event->Phone Event->Missed Call
Tasks:
1. Variable Set
Name %vCOUNTER To 0

2. Wait
Seconds 10

3. Variable Set
Name %vMISSEDCALL to On
If %SCREEN ~ off

4. Variable Set
Name %vMISSEDCALL to Off
If %vCOUNTER > 20

5. Wait
Minutes 3
If %vMISSEDCALL ~ On

6. Notify Sound
Title Missed Call
If %vMISSEDCALL ~ On

7. Variable Add
Name %vCOUNTER Value 1

8. Goto Action
Number 4
If %vMISSEDCALL ~ On

profile 2
Context: Event->Display Event->Display Unlocked
Tasks:
1. Variable Set
Name %vMISSEDCALL To Off

i basically copied the above from the following link and changed it to sound notification instead of vibrate:

http://tasker.wikidot.com/notificationpulse

the only thing that doesn't compute for me (besides it not working) is the %SCREEN variable. is that a fixed variable?
 
  • Like
Reactions: violet.tester128

strictlyrude27

Senior Member
Jan 12, 2010
551
451
Seattle, WA
thanks strictlyrude27, i'll give it a shot. any idea why the following isn't working for me? i'm testing by calling my phone, from another, and hanging up. does absolutely nothing:

profile 1
Context: Event->Phone Event->Missed Call
Tasks:
1. Variable Set
Name %vCOUNTER To 0

2. Wait
Seconds 10

3. Variable Set
Name %vMISSEDCALL to On
If %SCREEN ~ off

4. Variable Set
Name %vMISSEDCALL to Off
If %vCOUNTER > 20

5. Wait
Minutes 3
If %vMISSEDCALL ~ On

6. Notify Sound
Title Missed Call
If %vMISSEDCALL ~ On

7. Variable Add
Name %vCOUNTER Value 1

8. Goto Action
Number 4
If %vMISSEDCALL ~ On

profile 2
Context: Event->Display Event->Display Unlocked
Tasks:
1. Variable Set
Name %vMISSEDCALL To Off

i basically copied the above from the following link and changed it to sound notification instead of vibrate:

http://tasker.wikidot.com/notificationpulse

the only thing that doesn't compute for me (besides it not working) is the %SCREEN variable. is that a fixed variable?

You could try a longer initial wait time? Perhaps the 10 seconds is expiring while the phone's screen is still on after the missed call, in which case %SCREEN == "on" and the loop never runs.

%SCREEN is a built-in variable, and is set to "on" when the screen is on, and "off" when the screen is off.
 
Last edited:

LevitateJay

Senior Member
Dec 18, 2009
256
44
Hey does anybody know a way I can set a variable for everytime my music is playing? I'm trying to setup a conditional pause on a bluetooth profile but I can't find any reliable way to check if music is currently playing or not!

Anyone can help?? Setting a variable when the music application runs doesn't work as it seems to stop running when you turn off screen or go to another application even though music is still playing..
 

pongalong

Senior Member
Jan 21, 2010
228
17
I found that turning WiFi on by location wasn't 100% reliable and it used more battery, so this profile is 100% reliable and it uses less battery.

This profile turns on WiFi every 4 minutes for 10 seconds and them disable it, but if connected to a know hotspot it will leave WiFi on until disconnect, once disconnected it will start the cycle again.

PROFILE 1 CONTEXT
State: Wifi Connected
ENTER TASK
WiFi On
Variable Set, %CON to 1
Flash text, WiFi Connected
EXIT TASK
Variable Clear, %CON
Flash text, WiFi Disconnected
Wait 2 seconds [If Not Set %WAIT]
WiFi Off [If Not Set %WAIT]
Flash text, Turning WiFi off [If Not Set %WAIT]

PROFILE 2 CONTEXT
Time: Repeat: 4 minutes (no From or To)
Variable Value: Not Set %CON
ENTER TASK
Variable Set, %WAIT to 1
Wifi On
Flash text, Checking for WiFi connection
Wait 10 seconds <---- your can add more if necessary
Wifi Off [If Not Set %CON] <----in case you connect during the 10 seconds
Flash text, No Wifi connection found [If Not Set %CON]
Variable Clear, %WAIT

If your N1 doesn't auto connect to your netwok this profile will not work for you.
The "Flash text" is optional, but if your new to tasker it help to flash what tasker is doing.
You can remove them once it's working for your. I tent to leave them on.

I have something similar but I use network location to set %NEARWIFI and cycle the wifi on/off only when it's set.
 

pongalong

Senior Member
Jan 21, 2010
228
17
Check this out.
I use this Profile to connect to my car stereo via bluetooth.


Were you able to manually connect to a bluetooth device or did it just auto-pair when you enabled your bluetooth. As far as I know the N1 only auto-pairs with HSP (headset) profile devices. Looks like you're using a Sony that is also a headset. Let me know if otherwise because I'd love to be able to manually connect.
 

myth90045

Member
Jul 8, 2010
5
0
Enable GPS when turning on Navigation

I was wondering if you could help me. I picked this app up last night and tried it for a bit.

my first task was to have gps turn on when I open the navigator app.

However, when I do that, the navi app will turn on, but it will pop up a message saying GPS in not enabled. Enable? If I hit ok, it will take me to the connections page.

If I dont hit ok, the navi in the background will load and the GPS will enable, but I can not enter a location because of this pop up.

SO is there a way I can do this without having the Message pop up?

I created a profile for my 4square where I enter that app and the gps will turn on. But I can not seem to get it right for the Navigation. Any help would be greatly appreciated!!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 17
    Tasker - Scheduled Nandroid Backup with File Management [V4]

    Profile Aim

    DUE TO CHANGES IN ROM MANAGER THIS IS CURRENTLY NOT WORKING! :mad:

    Working on a fix....


    To take a nandroid backup whilst you sleep and manage the backup files so no more than two are stored.

    Downloads

    ROM Manager Free from the market
    Locale Execute Plugin Free from the market
    Icons used are Glossy Silver HD free from 'Download more icons' prompt in Tasker

    Profile Explanantion

    V2 - [Dropped] (But good for educational purposes)
    Code:
    There are only a few actions to explain in more detail:
    
    The task [B]NandroidFiles[/B] deletes the Nandroid backups from two days before. I set this as two days so not to use too much storage space and to make sure there was a spare backup in case the daily backup task failed for any reason.
    
    The back up folder is found in [I]sdcard/clockworkmod/backup/[/I] and automatically named [I]scheduledbackup-2011-06-02-05.00.00/[/I]
    
    The '2011-06-02' is initially a problem as this is almost the opposite of Tasker's inbuilt [B]%DATE[/B] variable formatted as '6-2-11'. We need to use Tasker's [B]%DATE[/B] minus two days to match it to the dated backup file we want to delete.
    
    Following the task through, you'll see that we transfer [B]%DATE[/B] to the created variable [B][B]%NDATE[/B][/B] before 'variable splitting' it by the '-' to leave 6 2 and 11 in [B]%NDATE1[/B], [B]%NDATE2[/B] and [B]%NDATE3[/B] respectively.
    
    So, it's the 2nd of June for the sake of this example and using basic maths would mean that two days before this would be the 2-2 of June = 0th of June!? That's obviously no good to us... It should be the 31st May, so how do we easily do that...?!!? :eek: 
    
    The answer is to use a 'pseudo-array' from [URL="http://groups.google.com/group/tasker/browse_thread/thread/1e1c531b900312e9#"]this thread[/URL] with credit to the brains of [URL="http://androidforums.com/members/unclemike.html"]UncleMike [/URL]. Now don't take a look at the below and give up reading, because it's actually a very simple and useful process. Honest(!): 
    
    If we are in the 6th month of the year which is June and our -2 days are taking us back to the number of days in May, then we need to quickly reference the 6th month to the 31 days of May. Have a look below and you'll see that between the brackets of (6) is the number 31.
    [CODE]x(1)31(1)(2)31(2)(3)28(3)(4)31(4)(5)30(5)(6)31(6)(7)30(7)(8)31(8)(9)31(9)(10)30(10)(11)31(11)(12)30(12)x
    We set the above to a created variable of %NMONTH and using a very simple variable split of the current month number of 6, which in the previous split was set to %NDATE1 we get %NMONTH1 to be set to 31!

    Using this method we can say that if the current day of the month is less than 3, then we need to use the above to find out the number of days in the previous month. So, we can then add the current day of the month which for this example is the 2nd of June, to the 31 days in May, 31+2=33 Taking 2 from this gives us 31! Sorted! Other than that we now need the month to show as '5' rather than the current '6'.

    We know that if the day of the month is less than 3, we are going to be using a date from the previous month - so that is the IF statement we use. IF the day of the month %NDATE1 is less than 3, then we know we need to -1 from the month number %NDATE2. Sorted!

    I explained that in as much detail as I could for you. I hope it made sense. Once we've done the above maths we 'variable join' the date together in the same format as the clockmod backup folder.

    The next problem we have is that the backup, although triggered by a time context of 5am, can actually be delayed. I've had a backup named scheduledbackup-2011-06-02-05.00.07/. Unfortunately, pattern matching is not yet available in Tasker to use on file names, otherwise using the wildcard of '*' to delete the file scheduledbackup-2011-06-02-05.00.0*/ would have been a simple option.

    Remembering that the date format %NDATE of the backup is needed to reference the file, we also cannot simply use locale execute to delete the file scheduledbackup-%NDATE-05.00.0*/. Tasker doesn't pass variables to it in that way.

    The solution is to ask locale execute to delete files that are listed in a .txt file on the storage card. This way, we can tell Tasker to write scheduledbackup-%NDATE-05.00.0*/ to a text file beforehand. That's not strictly true though, as stated above, pattern matching of '*' is not available (yet) in file names.. so as a workaround for now, we write scheduledbackup-%NDATE-05.00.01/, scheduledbackup-%NDATE-05.00.02/, scheduledbackup-%NDATE-05.00.03/ etc to the text file to make sure all options are covered.

    For your reference, locale execute plugin uses the command:
    Code:
    @! xargs rm -rf < /mnt/sdcard/nandroiddel.txt
    The '@!' stops the command from being flashed up on the screen. The remainder of the command tells locale to delete the files listed in the file nandroiddel.txt.

    I think that's about it!? A nandroid backup whilst you sleep, with the backup files managed...

    Sorted?[/CODE]

    V4 - (Very Easy)

    Forces closes on the latest release, when trying to use the ROM manager intents have meant another way was needed to get Tasker to manage this. BIG thanks to waydownsouth who cracked it in style.

    The first profile will check the version number you are running before writing a file to the cache/recovery folder, which will trigger the automatic backup when booting into recovery.

    The file management is done in the same way as version 3.

    Version 2 used a long-winded work-around to manage the backup files. But thanks to those mentioned in the credits below, there is a much, much more simple way using Locale Execute Plugin and a Linux command:

    Code:
    find /mnt/sdcard/clockworkmod/backup -mtime +1 -exec rm -rf {} \;

    The '+1' in the above command denotes how many days prior to today the backups will be deleted. It's up to you to alter this number depending on how many backups you wish to keep and how often you make them.

    The days and time are configurable within the profiles.

    Any questions, let me know!

    Credits
    waydownsouth for sharing the auto-backup work-around and help with syntax
    heywtf for the discovery of the auto-backup intent
    UncleMike for his genius 'pseudo-array'.
    crachel the Tasker guru for letting me hijack his thread and agreeing to answer all of your questions ;)

    As always, the thanks button is the only way I know I should keep posting this stuff :eek: And please don't forget the users above too!

    Note: You will need to grant SuperUser permissions for each command prior to the profile running correctly. I would suggest you add a STOP action above the final 'execute reboot' command, then keep pressing 'test' until SuperUser has stopped requesting permissions - remove the STOP action and the task will run automatically thereafter.

    IMPORTANT NOTE: After importing the profiles ensure you 'apply' out of Tasker so they are saved. If you run the profiles without doing this, the profiles will not be there after the reboot! Please always backup your Tasker profiles initially too. Thanks to waydownsouth for pointing this out!
    8
    Here's the script I came up with to do nandroid backups. Perks of using my script rather than brandall's profiles (god bless his soul and peace be upon him):
    • Tasker profiles are SUPER easy to set up - single action of executing the script, and the profile intent is less obfuscated
    • ROM and kernel information appended to backup

    I'm using CWM4 (and apparently it's not officially supported on my phone, ROM Manager thinks I don't have a recovery), so the line that concerns getting the user's version of CWM doesn't make a lick of difference to me - I could use someone to look over my script and test it out for me; seems to work on sample files I've gotten though.

    Credits are to brandall, heywtf, waydownsouth, et al. Thanks for making this work possible!

    Code:
    #!/system/bin/sh
    
    # nandroid.sh
    # Written by: strictlyrude27
    #             strictlyrude27@gmail.com
    # Date: 22 July 2011
    #
    # This script reboots your device into recovery mode and performs a Nandroid
    # backup - the name of the backup is [date-time_rom_kernel]. This requires super-
    # user permissions to run. Execute it in shell or via Locale Execute Plugin
    # (either via Tasker or Locale).
    #
    # Acknowledgements:
    #     brandall (http://goo.gl/ejhov)
    #         - for developing the original Tasker Nandroid profile scheme
    #           (original scheme at http://goo.gl/s9mp9)
    #     heywtf, waydownsouth, et al
    #         - "If I have seen a little further, it is by standing on the shoulders
    #            of giants." --Isaac Newton
    #
    # CHANGELOG
    #     8/7  - cleaning up the script nicely thanks to waydownsouth's input! 
    #     7/22 - initial release
    
    settingsfile=/sdcard/clockworkmod/.settings
    cmdfile=/cache/recovery/extendedcommand
    last_log=/cache/recovery/last_log
    
    # Build time/date, ROM, kernel information
    thetime=`date +%F-%I.%M.%S%P`
    kernel=`uname -r`
    
    rom=`getprop ro.modversion | sed 's/CyanogenMod/CM/'`
    
    # test for last_log first...
    if [ -e $last_log ]; then
        cwm=`sed -n 's/.*ClockworkMod Recovery v\([0-9]\).*/\1/p' $last_log`
    elif [ -e $settingsfile ]; then
        cwm=`sed 's/.*recovery_version":"\([0-9]\).*/\1/' $settingsfile`
    fi
    
    cwm=${cwm:-3}
    
    if [ "$cwm" -le 2 ]; then
        cat > $cmdfile<<EOF
    print "Tasker Nandroid Backup: ${thetime} ${rom} ${kernel}"
    backup_rom /sdcard/clockworkmod/backup/${thetime}_${rom}_${kernel}
    EOF
    
    elif [ "$cwm" -ge 3 ]; then
    # CWM3+ syntax
        cat > $cmdfile<<EOF
    ui_print("Tasker Nandroid Backup: ${thetime} ${rom} ${kernel}");
    backup_rom("/sdcard/clockworkmod/backup/${thetime}_${rom}_${kernel}");
    EOF
    fi
    
    reboot recovery
    7
    can you please explain how you did this? I'm guessing you used secure settings for failed login attempts right?
    how did you make tasker to send the taken picture via email? please share your setup ;)
    thanks

    Thanks toody for your reminder, I lost track of tasker thread for awhile. Some friends of mine think this setting is useless; gladly there are some guys like my stuffs :eek:

    Here go the profile/ task setting:

    You need to install Secure Settings from Google Play, once open it, slide to tab "Helper" and install Secure Setting Helper from there (this is activate all functions of Secure Settings included Failed Login Attempts"

    Install SL4A from Google Play, open it -> click on menu -> Add -> Python 2.6.2 and install it (this will be used to send your email)

    Set pattern lock for your phone

    Set Profile:
    Add new profile -> name it watever you want -> State -> Plugin -> Secure Settings -> Configuration: Edit -> Failed Login Attempts -> type number of attempts you want (remember to tick Device admin Enabled) -> Save -> Done

    Set Tasks:
    New Task -> name it yourself
    Click + -> Net -> Mobi data -> On
    Click + -> Net -> Wifi -> On
    Click + -> Task -> Wait -> 2 seconds
    Click + -> Media -> Take Photo -> Camera: Front -> Filename: %PHOTONUMBER
    Click + -> Variable -> Variable set -> Name: %PHOTONUMBER ->To: 1
    Click + -> Variable -> Variable add -> Name: %PHOTONUMBER -> Value: 1
    Click + -> Variable -> Variable set -> Name: %EMAIL_USER -> To: your Gmail address (only Gmail support so far)
    Click + -> Variable -> Variable set -> Name: %EMAIL_PSWD -> To: your Gmail password
    Click + -> Variable -> Variable set -> Name: %EMAIL_TO -> To: email address you want to send to
    Click + -> Variable -> Variable set -> Name: %EMAIL_ATTACH -> To: /sdcard/DCIM/Tasker/%PHOTONUMBER.jpg
    Click + -> Script -> Run SL4A Script -> Name: sendemailA.py -> Pass Variables: %EMAIL_USER,%EMAIL_PSWD,%EMAIL_TO,%EMAIL_ATTACH
    Click + -> Net -> Mobi data -> Off

    And it's good to go, you can add some more fancy actions like vibrate notification, or say out loud "intruder" or something :victory:

    I also have another to profile to delay screen lock if phone is used for 30 minutes, later than that it will resume as screen lock (pattern lock), Let's me know that you are interested
    5
    @Brandall,

    There is another method of firing a backup rather than the ROMmanager intent.

    when ClockworkMod boots, it looks to see if /cache/recovery/extendedcommand exists and executes it if found...

    all you need to do is create the extendedcommand file with the following contents

    Code:
    ui_print("Tasker Nandroid backup");
    backup_rom("/path/to/backup/folder");

    then via locale execute: reboot recovery

    been using this method for quite a while now.

    HTH :)
    4
    i have problem with tasker
    i created profile when i use app navitel - tasker should activate gps
    but nothing happens
    before at android 2.1 all worked fine profiles rolled up from backups

    In Gingerbread, Tasker can no longer toggle the GPS. This is not a problem however, as under menu/settings/location & security tick 'Use GPS satellites'.

    Even if this makes a widget show that GPS is 'on' - it isn't. Google will tell you that in Gingerbread, ticking this option means that GPS is ready to use when required and will use no additional resource.

    I've posted this same reply to many users who tick the box and then report back that indeed, it did use no battery power... :)

    So, you need to remove all of your GPS actions that you used in 2.1, as now when you start navigation or use a GET location action, GPS will automatically start and then stop after... Sorted!

    Hope that helped.