Tom*_*ond 3 android geofencing android-geofence
在Android中更新地理围栏的最佳方法是什么?是先删除旧的Geofences集合,然后像这样添加新更新的列表:
LocationServices.GeofencingApi.removeGeofences(
mGoogleApiClient,
getGeofencePendingIntent()
).setResultCallback(this);
LocationServices.GeofencingApi.addGeofences(
mGoogleApiClient,
getGeofencingRequest(),
getGeofencePendingIntent()
).setResultCallback(this); // Result processed in onResult().
Run Code Online (Sandbox Code Playgroud)
或者我可以直接打电话addGeofences而不删除旧的,并让新的替换旧的?
| 归档时间: |
|
| 查看次数: |
1512 次 |
| 最近记录: |