Wednesday, March 18, 2009

Android and ProximityAlerts: Have I found "the trick"?

As you know, I've been fighting with Proximity Alerts (PAs) in Android. The idea behind them is I can tell the LocationManager to notify me when I come within X distance of a geopoint (geographical point, a.k.a. latitude/longitude). There's is practically no discussion of this on the Google Groups, for the 1.0 version of the SDK anyway, and no one has been answering my postings.

My conclusion? PAs don't work, which is a shame cause it seems to be a killer feature of the Android framework.

Well, I Was running errands today and I decided to try something. I deleted every location in my Android save one. I then field-tested my app. The PA worked! I then drove to a local WiFi hotpsot (the local liquor store :-), changed the geopoint and tested it again. It worked again!

So my current theory is this: PAs work, but only one at a time. You can't load up several PAs becasue, presumably only the last one is read/active.

This means I have to write my own routine to determine what geopoints are nearby which kind of defeats the point of using PAs in the first place if you ask me.

Maybe I'll actually have a working demo for my presentation on Tuesday at the NYC Android Developer Meetup!

No comments:

Post a Comment