I try to update fence using following code:
AwarenessFence locationFence = LocationFence.entering(latitude, longitude, radius);
Awareness.FenceApi.updateFences(
mGoogleApiClient,
new FenceUpdateRequest.Builder()
.addFence(LOCATION_FENCE_KEY, locationFence, mPendingIntent)
.build())
.setResultCallback(new ResultCallback<Status>() {
@Override
public void onResult(@NonNull Status status) {
if (status.isSuccess()) {
Log.i(TAG, "Fence was successfully registered.");
} else {
Log.e(TAG, "Fence could not be registered: " + status);
}
}
});
It works fine on physical device, but on emulator I get following logcat message:
Status{statusCode=unknown status code: 7503, resolution=null}
Has anyone any idea what might cause this problem?
Have you tried setting the location in the emulator? This page has instructions:
https://developer.android.com/studio/run/emulator.html