Why Don't I Get Proximity Alterts Even Though I've Registered Alerts?
Solution 1:
You are registering this receiver dynamically, through registerReceiver(), to have it respond to broadcasts whose action string is WidgetService.ACTION_STOP_PROXIMITY.
However, the actual broadcast you are sending is trying to use an explicit Intent, identifying your receiver class. This does not line up with the IntentFilter that you are using with registerReceiver().
Either:
Register your receiver in the manifest and get rid of
registerReceiver(), in which case your explicitIntentwill work, orUse
new Intent(WidgetService.ACTION_STOP_PROXIMITY)instead ofnew Intent(this, ProximityIntentReceiver.class), so yourIntentlines up with yourIntentFilter
You cannot use explicit Intent objects to send broadcasts to receivers registered via registerReceiver(). An explicit Intent will only work with a manifest-registered receiver.
Solution 2:
make sure you type in the right coordinates. in DDMS they're reversed, longitude first, then latitude
Post a Comment for "Why Don't I Get Proximity Alterts Even Though I've Registered Alerts?"