What's the trick to making ProximityAlerts work?

by Faber Fedor » Sun, 08 Mar 2009 08:46:51 GMT

Sponsored Links
 ProximityRadius *is* big.  I think I was using 1500 meters in the field test
today.  The "10 feet" I mentioned below was the minimum distance to travel
before doing an location update. And I mean "10 meters".

I beginning to think my mental model is all wrong.  I thought I could
blindly throw intents out to the Android and it would fire off PAs back at
me.  Which intent belonged to which latlong was my problem to figure out.
I'm now thinking I need to keep each PA intent in a global data
structure^W^W^Winstance variable and carry them around with me and run an
RequestUpdate on each one. :-?

Is there someway for me to monitor myLocationManager to see when he fires
off a PA?


Faber Fedor
Linux New Jersey


What's the trick to making ProximityAlerts work?

by Mark Murphy » Sun, 08 Mar 2009 09:17:41 GMT


Ah, sorry. FWIW, requestLocationUpdates() and addProximityAlert() should
be orthogonal -- the settings you supply requestLocationUpdates() should
not impact the behavior of addProximityAlert().

PAs? I'm guessing you mean proximity alerts, not Pennsylvanias or
precious armadillos or something.

I don't think so, by design. LocationManager is a system service; your
app does not even need to be running to get a proximity alert.

The first edition of my Android book had a sample app that used
proximity alerts. I dumped that sample app (after having to re-re-write
it due to the constantly-changing location API) and now my book does not
have a proximity alert sample. I'll see if I can work that into _Android
Programming Tutorials_, though.

Mark Murphy (a Commons Guy)
Android Training in Sweden --  http://www.sotrium.com/training.php 


Sponsored Links

What's the trick to making ProximityAlerts work?

by Faber Fedor » Sun, 08 Mar 2009 09:27:07 GMT


I think there's still some connection between the two that I'm missing.

I noticed. :-)

The only example I've come across is WhereAmI.java which is based on a
previous SDK. I'm trying to glean the solution from that.

 For a "killer feature" of Android, there isn't much discussion or many
examples out there.

Another book?


Faber Fedor
Linux New Jersey


Other Threads

1. Writing to disk

Hi all,

with the emulator I can create directories via my apps and populate
with files (ex. /sdcard) - it seems that I have kind-of "root"
privileges (set by the
entry in the manifest file).
with the real device I am finding out that this is not possible (??).
Would the
only space that my apps can write be in predefined app spaces/
that Android allows for each installed app?
This is the case?



2. Google Android platform for robotics (serial connection support).


1) What Android-compatible hardware platforms (boards, like "beagle
board") can you recommend for hobby robotics?
Where can I see a list of Android-friendly boards with support of
serial (or parallel) connections?

We are going to move our Java ME robotics project (http://
www.RoboHobby.com) to Android platform, but what hardware to choose?

2) What can you say about support of serial connection on Android-
based phones?
Does it work in reality?
As I remember, in the Java ME world not all cell phones manufacturers
supported serial connections on their J2ME implementations.
For example serial connections were supported on some models of
Siemens and Sony-Ericson, but they were not supported on Nokia and
Sumsung, etc.

What is going on with serial connection support in the Android World?
Is this supported in reality? On which cell phones?

3) Is it possible to use on Android devices (boards) not BlueTooth/USB
conection, but wired connection, like RS232 "COM" port on PC?

PS: I see funny wordplay - Android as a Google project and Android as
a human-like robot.

http://www.RoboHobby.com - Java Robotics, Code Examples. PICkit2
tutorials, J2ME mobile phone Java as a robot's brain, KAP (Kite Aerial


3. SQL lite

4. Highlight focus item on listview

5. Finding a development phone - how is the LG Optimus GT540?

6. doubts about wifi application

7. webview.loadUrl - native