Android Geofencingclient ApiException 1004:

Viewed 2392

I have been trying to implement Geofencing for an android app, and right now after initializing the GeoFenceRequest as per Google's Documentation and then adding it with the GeoFencingClient

geofencingClient.addGeofences(geoFenceRequest, geofencePendingIntent).addOnSuccessListener {
        Log.d(TAG, "GeoFence Added")
    }.addOnFailureListener {
        Log.d(TAG, "GeoFence Failed to Add")
    }

i get this error

com.google.android.gms.common.api.ApiException: 1004: 

and i cannot find any documentation describing anything related to it at all

2 Answers

I changed my app's location setting from

ALLOWED ONLY WHILE IN USE

to

ALLOWED ALL THE TIME

and it worked.

enter image description here

Related