我在 onAddGeofencesResult(int statusCode, String[] geofenceRequestIds)
回调中遇到错误,其中 statusCode = 1000
.
I am getting an error in the onAddGeofencesResult(int statusCode, String[] geofenceRequestIds)
callback with statusCode = 1000
.
我已启用 GPS 和 WiFi.我也有 Google Play 服务,我可以跟踪我的位置并请求更新.为什么我无法添加地理围栏?即使从文档示例应用程序中,我也无法添加地理围栏.我收到以下 Toast 消息:
I have my GPS enabled and my WiFi. I also have Google Play Services and I am able to track my location and request updates. Why am I not able to add geofences? I am not able to add geofences even from the documentation sample app. I get the following Toast message:
添加地理围栏:失败,错误代码 1000 GeofenceRequestIds=[1,2,1,2]"
"Add Geofences: Failure, error code 1000 GeofenceRequestIds=[1,2,1,2]"
来自文档(statusCode 1000):
From the documentation (statusCode 1000):
public static final int GEOFENCE_NOT_AVAILABLE
地理围栏服务现在不可用.通常这是因为用户在设置中关闭了位置访问权限 >位置访问.
Geofence service is not available now. Typically this is because the user turned off location access in settings > location access.
常数值:1000 (0x000003e8)
Constant Value: 1000 (0x000003e8)
当用户在 Settings->Location- 中不同意使用 Google 位置服务"时,您会得到 GEOFENCE_NOT_AVAILABLE
(code '1000')>模式:
You get GEOFENCE_NOT_AVAILABLE
(code '1000') when user disagrees to "Use Google' location services" in Settings->Location->Mode:
修复它:
这篇关于在 Android 中添加地理围栏时出错(状态码 1000)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!