Awareness.SnapshotApi.getLocation(client)
.setResultCallback(new ResultCallback<LocationResult>() {
@Override
public void onResult(@NonNull LocationResult locationResult) {
if (locationResult.getStatus().isSuccess()) {
}
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
String error = e.getMessage();
}
com.google.android.gms.com.api.ApiException。17: API.ContextManager.API在此设备上不可用。ContextManager.API is not available on this device.
我收到这个错误作为一个异常,当运行在Android 9本质的手机上的应用程序,但没有异常,当运行在Android 8三星s8。
我已经更新到最新的16.0.0意识包。
在我的例子中,从以下地方激活Awareness API https:/console.developer.google.com。 为我的项目解决了这个问题。