Skip to content Skip to sidebar Skip to footer

Proximity Alerts Keep Being Added, How To Remove Them By Using Id's?

I set up my map and a proximity alert for each map marker, here I am passing the lat and long, and place name to the add proximity alert method: if(alerts==true) { addProximityAler

Solution 1:

I guess you should maintain some kind of List where you keep all your Alerts with their intents to avoid adding them twice or several times. Also depending on your usage scenario, you should probably remove them, after notification:

lm.removeProximityAlert(PendingIntent intent)

But more probable is that you registered your BroadcastReceiver several times :) Try to call this only once (and not every time you add an alert):

registerReceiver(new ProximityIntentReceiver(), filter);

Post a Comment for "Proximity Alerts Keep Being Added, How To Remove Them By Using Id's?"