i have used broadcast reciever for getting alerts on specific location using pending intents(proximate alerts)
but it do not fire any notification when app is closed or in background how i can do this please help me to set this .
here what i tried in xml:
<receiver android:name=".ProximityIntentReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
i also register it in activity :
IntentFilter filter = new IntentFilter(PROXIMTY_ALERT_INTENT);
registerReceiver(new ProximityIntentReceiver(), filter);
in this way im getting notification when activity is running but afert i closed it i do not get any notification. what is proper way to do this.
You could add more actions to your intent filter, this question here should help you with that:
BroadcastReceiver for location
Or there may be a way of creating a
Listenerto listen for changes in GPS location. Check here for information: http://developer.android.com/reference/android/location/LocationListener.html