註冊圍欄我嘗試使用下面的代碼來更新柵欄:谷歌意識API不能在模擬器
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);
}
}
});
它正常工作的物理設備,但在模擬器我獲得以下logcat的消息:
Status{statusCode=unknown status code: 7503, resolution=null}
有沒有人有任何想法可能會導致這個問題?
鏈接很好,但你應該總結說明。即使鏈接無效,這也會使您的答案保持相關。 – AdamBT