I need to add more than one proximity alert with addProximityAlert method from LocationManager. The problem is that when i receive the intent informing that the user is near to one of the regions that i am listening for alerts i can get if the user is entering or exiting in a region reading KEY_PROXIMITY_ENTERING, but i dont know what is the region he is entering or exiting. Is there any way the get this kind of info?
I need to add more than one proximity alert with addProximityAlert method from LocationManager.
Share
well, to add a ProximityAlert you need a PendingIntent, a PeindingIntent can be obtained with PendingIntent.getBroadcast(aContext, aRequestCode, anIntent, 0); Now, in the third parameter ‘anIntent’ you can put any data you want, like a Location object, a city name obtained with the location,
i do this like this:
now, when you receive the broadcast message, you must obtain the location info from the passed intent, something like this;
cheers