Geofence Not Triggering
I'm trying to implement Geofence on my APP and the problem is that is not triggering when I'm on the place that I've marked. The thing that I do is I set the Latitude & Longitu
Solution 1:
It will never work because what you are doing is
Intent intent = newIntent(appContext, GeofenceSingleton.class);
passing intent to GeofenceSingleton ?
What you need to do is
Intent intent = newIntent(appContext, GeofenceTransitionsIntentService.class);
Solution 2:
If your Intent is already constructed with the proper class (see varunkr's answer), you also need to make sure the service is also included in your AndroidManifest.xml
.
<application...
<serviceandroid:name=".GeofencingTransitionIntentService" />
Solution 3:
Make sure your service and broadcast receive have these property enabled in manifest.
android:enabled="true"
android:exported="true"
Solution 4:
As I already answer here, Geofence API
is something like passive location receiver, i.e. you must requesting coordinates from LocationServices.FusedLocationApi.requestLocationUpdates
in parallel when you need Geofence
to work.
Post a Comment for "Geofence Not Triggering"