Android-Geofence-21 icon indicating copy to clipboard operation
Android-Geofence-21 copied to clipboard

QUESTION: why not use simply "LocationServices.getGeofencingClient(this)"

Open eriknyk opened this issue 8 years ago • 1 comments

why not are you using simply LocationServices.getGeofencingClient() like official google samples to get current user location?

mGeofencingClient = LocationServices.getGeofencingClient(this);
mGeofencingClient.addGeofences(getGeofencingRequest(), getGeofencePendingIntent())
                        .addOnCompleteListener(this);
                ...

https://github.com/googlesamples/android-play-location/blob/master/Geofencing/app/src/main/java/com/google/android/gms/location/sample/geofencing/MainActivity.java#L111

Any special reason?

Best Regards.

eriknyk avatar Mar 20 '18 00:03 eriknyk

Not sure why, probably because two years ago LocationServices.getGeofencingClient() wasn't available. This was the way to do it, it probably changed since then, to be honest I didn't check how it works in lastest APIs.

vhoen avatar Mar 20 '18 08:03 vhoen