Dear group,
I'm trying to set up a mapping application that allows to track down
multiple POIs where different kinds of location based information
(images, texts, audiofiles) are provided.
For each point, a ProximityAlert is added to the LocationManager with
a
PendingIntent:
private void addProximityAlert(double latitude, double longitude) {
Intent intent = new
Intent("org.something.ProximityIntentReceiver");
PendingIntent proximityIntent =
PendingIntent.getBroadcast(this,
0, intent, 0);
locationManager.addProximityAlert(
latitude, // the latitude of the central point of the
alert
region
longitude, // the longitude of the central point of the
alert region
20, // the radius of the central point of the alert
region,
in meters
-1, // time for this proximity alert, in milliseconds, or
-1
to indicate no expiration
proximityIntent // will be used to generate an Intent to
fire when entry to or exit from the alert region is detected
);
IntentFilter filter = new
IntentFilter("de.eulegdi.rieselfelder.ProximityIntentReceiver");
registerReceiver(new ProximityIntentReceiver(), filter);
int g = 0;
}
I found this Example on
"http://www.javacodegeeks.com/2011/01/android-proximity-alerts-
tutorial.html",
it makes use of ProximityIntentReceiver class (an extension of
BroadcasReceiver).
Unfortunately, when I reach proximity of a POI all Intents are fired
at
once though each one is defined using different coordinates. What am I
doing wrong? The example only uses one POI at a time though more than
one should be possible!?
Any help is appreciated! Thanks & best regards,
Georg
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en