Skip to content Skip to sidebar Skip to footer

Google Awareness Api Cannot Register Fence On Emulator

I try to update fence using following code: AwarenessFence locationFence = LocationFence.entering(latitude, longitude, radius); Awareness.FenceApi.updateFences( mG

Solution 1:

Have you tried setting the location in the emulator? This page has instructions:

https://developer.android.com/studio/run/emulator.html

Solution 2:

According to the documentation, 7503 means:

ACL_ACCESS_DENIED: ACL authentication failed.

However, it seems like this is an emulator issue, because registering a TimeFence does work for me. Whereas Location- and ActivityFences don't.

AwarenessFencetimeFence= TimeFence.inSaturdayInterval(TimeZone.getDefault(), 0, 24 * 60 * 60 * 1000);

Solution 3:

To use the Awareness API, you need:

GooglePlayServices (on emulator, Google Apis)

To Location Fences: Location services activated on device. If on emulator or stand device, I think you can fake it.

Seems that activity detect awareness uses a complex bunch of sensors like accelerometer, giroscope, locations, etc. So I don't now how efficient that can be on emulator.

And, finally, the device/emulator needs Internet connection! At first glance, you can think that Awareness location API is an offline service. It's not. If you check your Google Developer Console, you can see the awareness requests to Google servers.

The error, kindly clarified by @jmols tell the tale: the API is trying access the security chain for connect with awareness service, and failing. Probably because the device doesn't have network connection.

If you have internet connection on your emulator, double check your credentials for this API on Google Developer console.

Post a Comment for "Google Awareness Api Cannot Register Fence On Emulator"