Location: Country

565 views
Skip to first unread message

Jelle

unread,
Aug 4, 2010, 9:51:33 AM8/4/10
to Tasker
Is there a way to say, do this if not in specified country. For
example if I travel from the Netherlands to Germany I want to switch
off data roaming and vice versa. I could look into writing a script
myself as I saw that android provides such a function:
http://developer.android.com/reference/android/location/Address.html#getCountryCode%28%29
But could the country be set as a variable perhaps?

Ricardo

unread,
Aug 4, 2010, 10:05:48 AM8/4/10
to Tasker
Isn't there an option to disable data roaming in android properties ?
Look at something like http://www.technipages.com/wp-content/uploads/2010/01/nexus-one-data-roaming.png

On 4 août, 15:51, Jelle <j.scholtalb...@gmail.com> wrote:
> Is there a way to say, do this if not in specified country. For
> example if I travel from the Netherlands to Germany I want to switch
> off data roaming and vice versa. I could look into writing a script
> myself as I saw that android provides such a function:http://developer.android.com/reference/android/location/Address.html#...

Jelle

unread,
Aug 5, 2010, 5:40:10 AM8/5/10
to Tasker
Data roaming can already be switched off by Tasker. What I want is to
do that based on the country I'm in.

On Aug 4, 4:05 pm, Ricardo <coelho....@gmail.com> wrote:
> Isn't there an option to disable data roaming in android properties ?
> Look at something likehttp://www.technipages.com/wp-content/uploads/2010/01/nexus-one-data-...

Pete Scott

unread,
Aug 5, 2010, 8:23:13 AM8/5/10
to Tasker
Jelle, In the meantime I imagine there's some sort of URL (Google Maps
related, perhaps?) you could post your GPS coordinates to (%LOC) which
would return some address information (at the very least, Country).
You could split the returned data until you got the Country value and
set it to a variable yourself.

BossMan

unread,
Aug 5, 2010, 8:55:37 AM8/5/10
to Tasker
Great idea :-)
Did some searching and found very useful service that can do exactly
what you want, without any captcha codes etc.
http://ws.geonames.org/findNearbyPlaceName?lat=47.3&lng=9

You can then split around country code or country name and you're
basically done.

Here's the main page, if you're interested in other services:
http://www.geonames.org/export/reverse-geocoding.html

BR,
A.

Ricardo

unread,
Aug 5, 2010, 9:33:50 AM8/5/10
to Tasker
You can use my "Get address task" at http://tasker.wikidot.com/locatephone2.
Then, you can split %ADDRESS to have the country.

On 5 août, 14:55, BossMan <adam.marynow...@gmail.com> wrote:
> Great idea :-)
> Did some searching and found very useful service that can do exactly
> what you want, without any captcha codes etc.http://ws.geonames.org/findNearbyPlaceName?lat=47.3&lng=9

Jelle

unread,
Aug 7, 2010, 12:13:02 PM8/7/10
to Tasker
Thx for the suggestions.
@ricardo, I keep getting an error from tasker that it can't find the
xml when browsing the profile pages and trying to download the "get
address task".
Also, although this could be a working work around, it does mean it
first has to gather the information from the internet! Which means in
order to shutdown data roaming I first have to pay a few cents to get
it to shutdown. Its not that much, but I still have to pay :)
But is there a way to get the gsm provider information within tasker?
This could already help as data roaming should only be enabled for one
specific provider.

On Aug 5, 3:33 pm, Ricardo <coelho....@gmail.com> wrote:
> You can use my "Get address task" athttp://tasker.wikidot.com/locatephone2.

Hazelip

unread,
Aug 7, 2010, 5:12:25 PM8/7/10
to Tasker
I tried downloading your tasks, too. They fail for me as well.

-Jake

BossMan

unread,
Aug 7, 2010, 5:19:09 PM8/7/10
to Tasker
I'm pretty sure it's because of the "white-space-in-the-profile-name"
bug :) :
http://groups.google.com/group/tasker/msg/f5f5f23df709e64b

Pent,
do you still remember this issue? :)

A walkaround is to download via browser and then copying to /sdcard/
Tasker/profiles (I guess).

BR,
A.

Jelle

unread,
Aug 8, 2010, 9:08:07 AM8/8/10
to Tasker

Think I misunderstood the definition of data roaming. Setting this off
does indeed already solve my primary issue!

Still I might want to set other tasks based on the country.

On Aug 4, 4:05 pm, Ricardo <coelho....@gmail.com> wrote:
> Isn't there an option to disable data roaming in android properties ?
> Look at something likehttp://www.technipages.com/wp-content/uploads/2010/01/nexus-one-data-...
>
> On 4 août, 15:51, Jelle <j.scholtalb...@gmail.com> wrote:
>
>
>
> > Is there a way to say, do this if not in specifiedcountry. For
> > example if I travel from the Netherlands to Germany I want to switch
> > off data roaming and vice versa. I could look into writing a script
> > myself as I saw that android provides such a function:http://developer.android.com/reference/android/location/Address.html#...
> > But could thecountrybe set as a variable perhaps?

BossMan

unread,
Aug 8, 2010, 3:44:22 PM8/8/10
to Tasker
Luckily, it took you some time to discover this and people got very
productive in the mean time in order to solve the issue :-) Thanks a
lot for that :) If the thread had stopped at post #2, I'd not learnt
some very useful things about reverse geotagging and stuff :-)

BR,
A.
Reply all
Reply to author
Forward
0 new messages