To follow up on my last post, I'd test-driven a couple of profiling apps and was not fully satisfied with the results.
And then I came across what is considered to be the Holy Grail of all profiling apps:
Tasker.
Tasker allows the Android phone owner to completely automate tasks that would otherwise require manual intervention. This is how I've set Tasker up in my phone (edited 13 May '12 to remove superfluous profiles):
Profile Name: Not Home Vicinity
What it does: Turn off WiFi.
When it kicks on: When I'm out of my home vicinity.
Context
01. State -> Phone -> Cell Near (cell towers in my area)
INVERTED
Entry Task Name: Not Home Vicinity Value
01. Net -> WiFi -> Off
Profile Name: Home Vicinity
What it does: Set WiFi to toggle.
When it kicks on: When I'm in range of my home vicinity.
Context
01. State -> Phone -> Cell Near (cell towers in my area)
02. State -> Net -> WiFi Connected (SSID: my router's ssid)
INVERTED
Entry Task Name: Home Vicinity Value
01. Net -> WiFi -> Toggle
Profile Name: At Home
What it does: Turn on WiFi & Auto-sync, turn off gps and mobile data when at home. Do the reverse (less WiFi settings) when leaving home.
When it kicks on: I'm connected to my home WiFi AND one of the GSM cells in my area
Context
01. State -> Net -> Wifi Connected (SSID: my router's ssid)
02. State -> Phone -> Cell Near (cell towers in my area)
Entry Task Name: Home Values
01. 3rd Party -> WidgetLocker -> Suspend
02. Variable -> Variable Set -> %atHome To 1
//tells phone its at home for use in later profiles
03. Net -> WiFi -> On
04. Net -> Mobile Data -> Off
05. Net -> Auto-Sync -> On
06. Plugin -> Secure Settings -> Edit -> GPS -> Off
//requires Secure Settings Plugin & rooted device
07. Display -> Display Timeout -> 1 min.
08. Misc -> Say -> "Welcome home!"
Exit Task Name: Exit Home
01. Variable -> Variable Set -> %atHome To 0
02. Net -> Mobile Data -> O,
03. Net -> Auto-Sync -> Off
04. Plugin -> Secure Settings -> Edit -> GPS -> On
05. Display -> Display Timeout -> 30 sec.
06. Misc -> Say -> "Have a great day."
07. 3rd Party -> WidgetLocker -> Resume
Profile: Jabra Bluetooth Audio
What it does: Kicks on Poweramp, sets BT Voice and Media volumes to maximum. Turns bluetooth off and kills Poweramp once headphones are disconnected.
When it kicks on: Once bluetooth connection to Jabra headphones is established
Context
01. State -> Net -> Bluetooth Connected (Name: Jabra Halo)
Entry Task Name: Home With Bluetooth Values
01. Audio -> BT Voice Volume -> Level 15
02. Audio -> Media Volume -> Level 15
03. Misc -> Say -> "Bluetooth audio activated." (if %pAmp = 0)
06. App -> Load App -> Poweramp (if %pAmp = 0)
//so that it doesn't try to load Poweramp if it is already loaded
07. Variable -> Variable Set -> %pAmp To 1
Exit Task Name: Exit Bluetooth Audio
01. Task -> Wait -> 5 sec.
02. Net -> Bluetooth -> Off
03. Misc -> Say -> "Bluetooth headset disconnected."
04. App -> Kill App -> Poweramp (if %pAmp = 1, Use Root On)
//so that it doesn't try to kill Poweramp if it is already killed
05. Variable -> Variable Set -> %pAmp To 0
Note: Both "At Home" and "Jabra Bluetooth Audio" are active together when listening to music wirelessly at home. When outdoors, only the latter is active.
Profile: Vibrate Only At Client's Place
What it does: Set phone to vibration mode only, disable GPS.
When it kicks on: When the GPS picks up my current location as within a 30-meter radius of my client's office building.
Context
01. Location -> New Location -> Client's Office Location (name: <insert your preferred location name here after browsing to said location on map>)
Entry Task Name: Vibration Values
01. Plugin -> Secure Settings -> Edit -> GPS -> Off
02. Audio -> Silent Mode -> Vibrate
03. Misc -> Say -> "Vibration mode active"
Exit Task Name: Exit Vibration
01. Plugin -> Secure Settings -> Edit -> GPS -> On
02. Audio -> Silent Mode -> Off
03. Misc -> Say -> "Vibration mode deactivated"
Profile: Goodnight!
What it does: Set phone to silent mode when its time to go to bed.
When it kicks on: When the room is dark AND phone is facing up. The latter prevents this mode from kicking on when in my holster or pocket.
Context
01. State -> Sensor -> Light Level (from 0 to 1)
02. State -> Sensor -> Orientation (Face Up)
Entry Task Name: Night Mode Values
01. Task -> Wait -> 15 sec.
02. Variable -> Variable Set -> %sleepOrAwake To 1
//tells phone I'm asleep for use in later profiles
03. Audio -> Silent Mode -> On
04. Display -> Night Mode -> On
05. Display -> Display Timeout -> 30 sec.
06. Misc -> Say -> "Goodnight and sweet dreams!"
Exit Task Name: Day Mode Values
01. Variable -> Variable Set -> %sleepOrAwake To 0
//tells phone I'm awake for use in later profiles
02. Audio -> Silent Mode -> Off
03. Display -> Night Mode -> Off
04. Display -> Display Timeout -> 1 min.
05. Misc -> Say -> "Good day!"
Note: For afternoon naps, all I have to do is draw the curtains and *BAM!* night mode kicks on. You might have to play with the Light Level value to get something that works for you.
Profile: Urgent Calls
What it does: Always receive phonecalls from chosen loved ones.
When it kicks on: When chosen loved ones call when the phone is in "Goodnight!" mode.
Context
01. State -> Phone -> Incoming Call -> (magnifying glass) -> A Single Contact (repeat for all desired contacts)
Entry Task Name: Urgent Caller Value
01. Task -> If -> %VOLR < 5
02. Audio -> Media Volume -> Level 15
03. Media -> Music Play -> (your chosen ringtone music file)
04. Task -> End If
Exit Task Name: Urgent Caller Exit
01. Media -> Music Stop
The next 3 profiles work together since the first of these cannot have an exit task.
Profile: Announce Caller
What it does: Announces the name (if in contact list) or number of caller
when at home AND awake.
When it kicks on: When the phone is ringing.
Context
01. Event -> Phone -> Phone Ringing
Entry Task Name: Announce Caller Name
01. Variable -> Variable Set -> %Ringing To 1
02. Task -> If -> %atHome = 1
03. Task -> If -> %sleepOrAwake = 0
04. Task -> If -> %CNAME Is Set
//i.e. caller exists in phonebook
05. Misc -> Say -> "Call from %CNAME"
06. Task -> Else
07. Misc -> Say -> "Call from %CNUM"
08. Task -> End If
09. Task -> End If
10. Task -> End If
Profile: Call Answered
What it does: To re-set the variable %Ringing, used above, to zero.
When it kicks on: When the call is answered.
Context
01. Event -> Phone -> Phone Offhook
Entry Task Name: CallFinished Value
01. Variable -> Variable Set -> %Ringing To 0
Profile: Phone Idle
What it does: To re-set the variable %Ringing, used above, to zero.
When it kicks in: When the call is not answered (missed call).
Context
01. Event -> Phone -> Phone Idle
Entry Task Name: CallFinished Value
01. Variable -> Variable Set -> %Ringing To 0
Profile: Missed Call Reminder
What it does: Our SGNs have no blinking LEDs to tell us if we've missed a call. This plays the "Notify Sound" at 2-minute intervals upon missed call and should do as a substitute.
When it kicks on: When the call is not answered (missed call).
Context
01. State -> Phone -> Missed Call
Entry Task Name: Missed Call Values
01. Task -> Wait -> 2 min.
02. Task -> Stop (if %PACTIVE Doesn't Match[!~] *missed call reminder*)
03. Alert -> Notify Sound (Title: Missed Call Reminder)
04. Task -> Goto (Type: Action Number, Number: 1)
Exit Task Name: Clear Missed Call Values
01. Misc -> Say -> "You have missed calls"
02. Alert -> Notify Cancel (Title: Missed Call Reminder)
Profile: Shake For Bluetooth
What it does: To turn on bluetooth without having to pull down the notification bar.
When it kicks on: When the phone's screen is switched on and phone is shaken left to right.
Context
01. Event -> Sensor -> Shake (Axis: Left-Right, Sensitivity: Medium, Duration:Short)
Entry Task Name: Bluetooth Values
01. Net -> Bluetooth -> On
02. Misc -> Say -> "Bluetooth activated. Please turn on your device."
Note: Once my bluetooth headset is connected, profile automatically changes to "Home With Bluetooth" or "Outdoor With Bluetooth" and kicks on Poweramp.
Also note: "Say" in all the above examples will only work when the screen is turned on. It will not work when the phone is asleep.
Many of these are examples taken from Tasker wiki as well as the huge
Takser thread in this forum. Many thanks to the original contributors to the above ideas that were shared.