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
Make sure your service and broadcast receive have these property enabled in manifest.
android:enabled="true"
android:exported="true"
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
...
<service android:name=".GeofencingTransitionIntentService" />
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.
It will never work because what you are doing is
Intent intent = new Intent(appContext, GeofenceSingleton.class);
passing intent to GeofenceSingleton ?
What you need to do is
Intent intent = new Intent(appContext, GeofenceTransitionsIntentService.class);