2
我的应用程序允许人们在特定位置创建地理围栏。它工作正常,但我似乎无法删除geofences。 这里是我的代码去除所有的地理栅栏。地理栅栏不能删除?
public void removeAllGeofences(GeofenceControllerListener listener) {
namedGeofencesToRemove = new ArrayList<>();
for (NamedGeofence namedGeofence : namedGeofences) {
namedGeofencesToRemove.add(namedGeofence);
}
this.listener = listener;
connectWithCallbacks(connectionRemoveListener);
}
这似乎并不奏效,除非我重新启动手机,否则地理栅栏将保持不变。 如何帮助或解释geofences的工作方式真的有帮助!