yashsingh1/xdaforums huggingface dataset:
[Nexus One Themes and Apps] ajamedor:
Tracka

Hi All,

I've created a Location Tracker which is triggered by SMS.

It's based on a Profile located here (http://tasker.wikidot.com/locateme-log-track-and-emergency) so props to TW. I'd like your feedback on it as well as testing.

Some teething issues I've found is the priorities in which the tasks are run. Variables seem to get lost in transit?

There are MULTIPLE files (tasks) as I've made the process very Modular, otherwise the task list becomes very long and hard to change. I hope this makes it easier to understand and customise to your needs.

Since it's modular, you can use the WiFi On/Off and GPS On/Off for your own tasks (such as program triggers or Location triggers). The tasks will check if the existing state is on. When it needs to turn off, it will restore to its original state. I did the same thing for On/Vibrate/Silent but I have not included it here. If you want that, you can just PM me.

Anyway, once you send "Tracka" to the phone, it will:

Check if a recent GPS location has been polled in the last 100 secs

If so, it will use this GPS location and poll GoogleMaps to get a short URL as well as the closest Address. It will send an SMS if it successfully retrieves the closest address.

Additionally, it will send other statistical data (Google Maps link, Location Accuracy, Moving Speed, How old the data is and Battery Left) by SMS.

If the GPS data is older than 100 secs, it will activate GPS and WiFi to get a GPS check (for 30 secs), if it fails to retrieve data, it will try again for another 30 secs.

In failing that, it will grab a location from the Cell Towers (Net) and perform the GoogleMaps short URL and closest Address again.

Then it will once again send the statistical data to your phone (inc. Google Maps Link).

You need to import all the tasks to your phone.

The LocateMe__AJ3 Task is practically the same task but based on the task mentioned in my first paragraph. You can test this too, if you wish.

Thanks

-Aj
[Nexus One Themes and Apps] khaytsus:
I'm going to check this out myself, been wanting to do this too. But I have to correct you on one thing, "Net" is not cellular.. I think Pent has on the todo list for sometime to do location estimates by Cell but AFAIK it's not there yet. I wonder if there are any simple services to return lat,lon from Google based on cell location... There are somewhat complicated methods, but simple I'm not sure about.. Plus I've noticed Android has some weird cell tower IDs in 3G, different from the ones I'm used to when I switch to 2G. I've done a lot of tinkering with mapping cell towers here in town, I recognize them normally, but not when I'm in 3G mode.

What "Net" location is, is based on your network IP address, which can be horribly, horribly wrong. I would suggest not using it at all. I've seen my phone show up in Kansas before, and I'm in central Kentucky.
[Nexus One Themes and Apps] ajamedor:
Thanks for clarifying this. This explains when I reboot my phone and perform this straight away when "Mobile Data" is NOT on and WiFi cannot connect to anything, it basically comes up with no NET data. It has no IP address to geo-locate from.

I guess I've been lucky with our current IP geo-locations and my assumptions were based on that but it's good to understand.

My assumption was probably based on the "Location" context and getting a Fix with "Net" button only says "Asking network provider only..."

So is the Get Fix for Net not based on Cell Near related data?

EDIT: I rebooted my phone and performed a Get Net Fix check and it relies on the Mobile Data (or Wifi) to be on. Didn't really notice that before. Thanks
[Nexus One Themes and Apps] khaytsus:
Yeah what I'd suggest is asking Pent about his progress on celltower location data.. It itself can be miles off, but I've never seen it be states away. :) Although I have a few times seen 0,0 returned for some cell towers, as I've apparently traveled to Africa a few times when estimating location based on cell towers, but not something I see too often.
[Nexus One Themes and Apps] ajamedor:
Well I guess I've done what I can to the best of my (and its) ability. Let me know how it goes.
[Nexus One Themes and Apps] teh_lorax:
In case it hasn't been mentioned, SysMonitor will do that for free. But I suppose its more fun to make Tasker do it...

http://www.appbrain.com/app/sysmonitor/sysmonitor.ndroidz.com
[Nexus One Themes and Apps] m4a1rifle:
How to create a widget that will let me input alarm time and alarm will goes off at the time i set?

i tried to create a context menu with some option of time (eg. 6.30am, 7.30am) and when 6.30am is selected it will set a variable to 0630, then i create a profile to with context to compare the variable with %TIME (build-in time variable) but seems like when the phone screen is off, the profile can't be triggered, probably due to the screen off update rate of 600 seconds.

i think about making the alarm fire profile with time context and repeats every minute to keep updating the %TIME. but this seems to be not efficient.

Any other solution?
[Nexus One Themes and Apps] starfarer:
Wasting loads of time understanding the basics and having trouble in what looks to be simple here.

GPS on/off for navigation or GpsStatus popping out with message to enable GPS. If I cancel, then works as expected but annoying everytime to press the button and defeating the whole purpose of putting one. Tried with wait function and works but this requires to put on as a widget. Is this how it should be as a widget? Then how can I change the icon for widget?

Not sure whether this can be done but very important for me. I work 4 days, then 4 off and 4 nights. Let's say start on 1st and finished by 4th. Then from 5-8 are days off. Night of 9th is first night work until 12th. Then 13-16 days off. Cycles on.

Is there any kind of automation to put these days and marked as such on Calendar or output to a file? Struggling to explain properly :-(
[Nexus One Themes and Apps] ashwinmudigonda:
Low battery tasker profile help

Hey Android+Tasker noob here. I am trying to figure out how to create a profile where in if the battery drops below a certain percentage, it announces LOW BATTERY, thereby prompting me to plug the phone in.

Can someone help me here? I know I have to access the %BATT% variable, but what is the context in the profile?
[Nexus One Themes and Apps] fachadick:
I don't think you need to use a variable here. You should be able to just use the regular battery level context, along with a flash message task.

Sent from my blah blah blah blah
[Nexus One Themes and Apps] ashwinmudigonda:
I thought about it. But my options under Power are BATTERY FULL, BATTERY OVERHEAT and BATTERY CHANGE. BATTERY CHANGE would only trigger an event if the battery level changed from the current value, I am assuming. How do I trigger when the battery drops below a certain threshold?
[Nexus One Themes and Apps] fachadick:
wrong context - battery level, not power. Top right context under state. Let's you choose specific battery percentages.

Sent from my blah blah blah blah
[Nexus One Themes and Apps] ashwinmudigonda:
Most sweet! Thanks! I feel so DUH!
[Nexus One Themes and Apps] fachadick:
Lol, believe me, I know that feeling well. :)

Sent from my blah blah blah blah
[Nexus One Themes and Apps] ashwinmudigonda:
Hey,

I have been playing with Tasker a bit more and I have a question. I am trying to setup a profile where, when the battery hits below 20%, I turn off WiFi, turn off autosync.

Now my question is this - if, in the exit task, I set autosync to be back on, how does this play out?

Say the battery is 19%. the profile gets triggered and it turns off wifi and autosync. Now what happens? Does it exit and turn autosync back on? Or does it stay in the profile because the battery is still < 20%? Or does it exit, turn autosync back on and then a few seconds later, repeat the profile?
[Nexus One Themes and Apps] khaytsus:
If the context is <20% as long as it's true, that Profile is active. You can see that when viewing the Tasker program itself, it outlines the profiles which are active. You can certainly test it by setting your threshold to some high number like 90% and seeing if it does what you expect, then plug it in and see if it recovers the way you expect.

Tasker generally does "the right thing", but it is fairly complicated to initially grok and it is limited in some ways by Android, such as the "Program running" context..
[Nexus One Themes and Apps] ashwinmudigonda:
Ok! I get that. I will check that out today.

Meanwhile, I was trying something else. I added a context based on Cell Location and made it say a phrase when I was in that area. It said the phrase once and then a few minutes later again. Does this mean it is updating all the profiles at a certain frequency and, since it found that the cell location matched the context, executed the profile again?

And in trying to get it to say only once, I played with variables. So how does that work? Does the scope of the variable destroy only when it exits the task or reset for each execution of the profile? If it executes the profile every few seconds from the first line, it might be reinitializing all my variables.

Thanks for helping me out!
[Nexus One Themes and Apps] khaytsus:
No, it means your current tower changed. As it says in the popup when you use that Context, you'll want to scan for a while. In fact at the house, I've gotten a list of 7 IDs so far. I've seen towers with 4, so my guess is that each tower has a directional cell in such cases and even though it's one physical tower there are actually 4 cells from the same provider.

He also has a "Recently seen" list, which you can tap to add, but don't go crazy here, especially if you want your context to be somewhat tight in its location, especially if you've been driving or something you don't want to add a bunch of random IDs from your commute or something.

Specific to variables here, you clearly haven't read the fine manual he has on his website. No, variables are unchanged forever, across reboots etc... You can of course change them or delete them but otherwise they are persistent.

http://tasker.dinglisch.net/userguide/userguide_index.html
[Nexus One Themes and Apps] myakove:
Is there any way to set CM renderFX at boot with Tasker?
[Nexus One Themes and Apps] crachel:
Like basically everyone I know, I have terrible coverage inside my house. So, I would like my Google Voice # to forward to Google Chat while I am at home so I can use the VOIP features and actually hear and be heard.

I found Locale Google Voice Set Plug which will allow me to do this!

When Tasker determines I'm on my home Wifi, I've told the plugin to forward my calls to Google Chat. This works much better than my previous setup within Google Voice in which I tried to guess when I was and wasn't home.
[Nexus One Themes and Apps] probers1:
I have been using an app called google voice locations for this. It works off your gps coordinates. It is available in the market and I think open sourced.
[Nexus One Themes and Apps] sean.lai:
+1, or even a prettier widget would be nice.
[Nexus One Themes and Apps] k1ngju571n:
Does anyone have settings to turn the screen on when you receive an sms? I've tried using this set up:

SMS Received - Turn on display

When I receive a message, I can hear the device unlock then immediately lock again. Screen never comes on throughout the process.

Sorry if this has already been reviewed. I didn't really feel like reading through all the pages.
[Nexus One Themes and Apps] teh_lorax:
So I setup Tasker to turn on my wifi when I'm at work using the cell towers, because I have such crappy coverage there. However, it seems that *sometimes* my connection drops totally, so I have ZERO towers. Tasker takes this as meaning Im not at work anymore and turns off wireless.

Any ideas on how to fix this?
[Nexus One Themes and Apps] :
I also used to use cell towers, but the varying reception in a large office, surrounded by electronics, meant it sometimes "located" me 2 miles away!

To avoid cranking up the radius, I decided simply to use time and date. Monday to Friday, 8:30 to 17:00, turn wifi on.

It'll also use less battery as it's no longer making periodic location checks for me.
[Nexus One Themes and Apps] teh_lorax:
No, I'm using the Locale Cell Plugin. It uses the actual cell tower IDs, not any of that silly triangulation (or how ever its calculated). But I need to figure out a way that it doesn't drop that profile when the cell towers drop away.

I'm wondering if I can setup a variable with a time stamp every 5 mins, then check the variable every 10 mins. If the timestamp is over 10 minutes old, turn off wifi. Not sure that's possible tho.
[Nexus One Themes and Apps] teh_lorax:
So I think I've worked it out...

When at work (via cell tower ID) : Set VAR %WORKTIME = %TIMES

^Somehow loop this every 2 mins^

Every 5 mins: If %WORKTIME < %TIMES - 300 then Turn off wireless

Now to actually make tasker do this
[Nexus One Themes and Apps] khaytsus:
So why aren't you using the built-in Cell Tower functionality in Tasker? What's the Locale Plugin do that Tasker doesn't do inherently?

Personally what I do is "inverse" the location logic.. If I'm at home (ie: A list of celltowers, one is active) I set %AtHome = 1. If I'm at work, same deal, %AtWork=1. Now, if by time I 'should' be at work, but %AtHome equals 1, I don't switch to the Work profile (ie: I'm working from home or such). And again, same for the Home profile, if AtWork = 1, don't change profile.

I had some reason for this but for some reason I can't think of what it was.
[Nexus One Themes and Apps] teh_lorax:
As far as I can see, you can only set location via Network or GPS by default in Tasker. Where do you set it via cell tower ID?
[Nexus One Themes and Apps] bgoldie:
State > Cell Near. Let it scan for 10 mins or so to pick up all the cells at the location
[Nexus One Themes and Apps] myakove:
I have tried to set simple profile:

WIFI connected > APN data off

But when i cannect to WIFI APN data still on.
[Nexus One Themes and Apps] khaytsus:
Yep, and I re-check it periodically and you'll be surprised to pick up more. Actually for a few days I had it beep every time it wasn't %AtHome = 1 and for the two nearby cell towers I'd logged 9 IDs. I think one tower can have 4 or more microcells or something like that.

Anywho, nothing to do with Tasker, just takes a little "maintenance" at first to get all of the IDs nearby.
[Nexus One Themes and Apps] nxtwrld:
there is a goto command for tasker as well as wait, so it should be fairly easy
[Nexus One Themes and Apps] artesea:
My nearest tower has 9 cells, set up pointing in three different directions we have a 2G 900MHz cell, 3G 2100MHz (1.8mbps) and HSPDA 2100Mhz (7.2mbps), other than space nothing stopping Vodafone from putting up more.
[Nexus One Themes and Apps] DroidBois:
So Cell Near does nothing but remember a cell signature. I will set up two then, one for cell signature for passive positioning that activates wifi scanning which activates a profile based on wifi near or wifi connect, no GPS needed for work and home then.

Or is it sufficient to use cell and wifi near and Tasker does not scanning until Cell Near is triggered.
[Nexus One Themes and Apps] teh_lorax:
Can anyone think of a good way to start/stop TMO's wifi calling app? I can obviously start it with Tasker, but you've still got to hit a button on the screen to activate the app.
[Nexus One Themes and Apps] Kid.Wonderbread:
Reboot

Any one know how to get tasker to add "reboot" to the power down menu? I have been playing with it, but don't see a way. But I am also new to the tasker app.
[Nexus One Themes and Apps] ajamedor:
Sharing more

Hey all,

Just sharing more setups that I've been messing around with.

If you find that there's an optimal process, please let us know!

Silent_Meeting:

Context Based on Workday (& 9am-5pm) & Location based on Net 1km (Bogus location attached) & Orientation of phone Face Down

Task will switch to silent mode

Exit Task will revert back to its original state (%SILENT = off/on/vibrate)

TTS_Call:

Tasker to read out caller's name (if known otherwise revert to number) or state if Number Withheld.

TTS_SMS:

Tasker to read out Sender's name (or number is not in contact list), wait, then read out message, then state time of message and date.

(I haven't figured out how to gracefully use the "Shut Up" command so if it's some SMS that's NSFW, it can be rather embarrassing. So quickly aborting the task would be appreciated. Right now I just put the volume down...)
[Nexus One Themes and Apps] teh_lorax:
I'm pretty sure you'd need root for tasker to reboot your phone. And if you have root, you might as well install CM - which has that by default.
[Nexus One Themes and Apps] rondietz1:
Turning Bluetooth Device on and off

Any suggestions on the easiest way to have the bluetooth device in my car automatically connect when I leave my house and disconnect when I arrive back at home. The device (BlueAnt) has too long of a range, so that when I park in my garage and go into the house it still remains connected. The biggest problem this causes is that if I make a phone call, the audio remains through the device, and I don't hear a thing through my phone (Sprint Hero). I am constantly calling people, realizing that they can't hear me, hanging up, turning off bluetooth, and calling them back. My friends are starting to laugh when I call them, because they know what I'm doing. Is the best way to do this by using location?? Please help.
[Nexus One Themes and Apps] md2:
use cell near to switch bluetooth off and an exit state to switch on again?
[Nexus One Themes and Apps] 3Shirts:
Surely the bluetooth device in your car turns off when you turn off the engine? If not, can't you just turn it off manually when you get out. Annoying I suppose but just make it part of the process. Turn off car, turn off bluetooth, get out, lock car.
[Nexus One Themes and Apps] myakove:
I have tried to set ADB over WIFI when WIFI connected with scrpt but without luck.

put the scripts in /sdcard/sl4a/scripts

and create profile when WIFI connected run the scripts.

the scripts are ADB on:

su

setprop service.adb.tcp.port 5555

stop adbd

start sdbd

and ADB off:

su

setprop service.adb.tcp.port -1

stop adbd

start sdbd

any ideas?
[Nexus One Themes and Apps] jetarpon:
Do you connect to wifi at home? Set up a profile that turns off bluetooth when connected to your home SSID.
[Nexus One Themes and Apps] fubaya:
Those would be shell scripts and I'm not sure if sl4a runs them, or how to run them if it does.

I would try making a script like this:

#! /system/bin/sh
if test -z "$1"; then exec echo "no off/on option given"; fi

if [ $1 == "on" ]; then
setprop service.adb.tcp.port 5555
stop adbd
start sdbd
fi

if [ $1 == "off" ]; then
setprop service.adb.tcp.port -1
stop adbd
start sdbd
fi

Then you can download and use the Locale Execute Plugin for Tasker to run it.

Let's assume you name the script "adb". If you put the script in /system/bin/sh and make it executable, in the plugin you could just enter "@! adb on" or "@! adb off". If you put it on the sdcard, I think you can run it with "@! sh /sdcard/adb on". That may be simpler, but I don't run scripts that way so I'm not entirely sure it will work.

The "!" runs it as root and the "@" makes it run quietly. If not for the "@", it pops up a message telling you it's running, which you may actually want.
[Nexus One Themes and Apps] khaytsus:
I just use the ADB over Wifi widget, works great. :)
[Nexus One Themes and Apps] scottkct:
Bright screen during day

This is a variation of another profile I found that uses FastBright. I didn't have success with it but found using native settings.

Basically, I want my screen to go to full bright only in certain apps during the day when I'm likely outdoors. Normally I'm fin with auto-bright but at tiimes particularly viewing photos in Gallery and Maps when on the road, full bright is best

-During hours of 7am-8pm

-Selected apps I want to view with bright screen (maps, gallery, SMS) Try others but found the phone and camera cause some problems.

~~~

-Turn off auto-bright, set brightness to full bright

-Turn on auto-bright

When launching maps or gallery, there is maybe a .5 sec delay for screen to go bright but man is it delightful when it does.
[Nexus One Themes and Apps] DroidBois:
I have set up something like this - is this the most efficient / best

way to do this?

Basically I want my phone to SMS my wife when I leave work and when

I'm nearing home each night, on a weekday, excluding public holidays

and weekends.

Work

Cell Near based

%WEEKDAY=1

Work Entry Task – set %WORK to 1

Work Exit Task – clear %WORK

Left Work

12 Hour Cooldown Set (to avoid multiple messages?)

IF %WORK =! 1

IF %WEEKDAY = 1 (which is overrided by public holidays)

TIME from 16:30 to 18:00

THEN

Message Wife IF %SENT =! 1

SET %SENT and %WORKHOME to 1

Coming Home

12 Hour Cooldown Set (to avoid multiple messages?)

IF %WORKHOME =1

IF NetLocation within 2km of HOME

THEN

Message Wife

CLEAR %WORKHOME

Clear %SENT (because the 12 hour cooldown should stop it firing off

another message but just in case?)

I am also adding a widget linked to a 'Clear Variable' task that

clears all my non location based variables (e.g. %WORKHOME and %SENT)

which I will use now to reset the system as for some reason the Coming

Home profile triggered this morning leaving home, so %WORKHOME was

still set (I think because Coming Home was not triggered yesterday

coming home, for some reason).
[Nexus One Themes and Apps] khaytsus:
You do NOT want net location, as it can be HUNDREDS of miles off. Unless your commute is very long, in which case I see why you want to send your wife automated SMS ;)

Use CellIDs, but you'll have to do a bit of training or you'll get false positives if it jumps on a tower ID it doesn't recognize. But if you're in the car, you might as well do GPS location. In my experience even polling GPS every 10m has VERY little impact on my battery life (on top of the other stuff I have going anyway, I see no difference).

How you do the "not on holidays" part will be interesting... A cascading task of STOP IF's I suppose?
[Nexus One Themes and Apps] cassini24:
awesome...thanks.
[Nexus One Themes and Apps] teh_lorax:
Does the leash and collar ever irritate your neck?
[Nexus One Themes and Apps] RietHart:
rofl :D. Is there a way to make Tasker turn the screen off? I tried setting %screen to 0, but Tasker doesn't want me to :(.

Also, I have a challenge. A profile that detects your first Gcal event of the day, then sets an alarm 1hr (or x minutes) before that event. That is waaay over my head, but maybe one of you guys got the skills to figure it out?