2
我的應用程序允許人們在特定位置創建地理圍欄。它工作正常,但我似乎無法刪除geofences。 這裏是我的代碼去除所有的地理柵欄。地理柵欄不能刪除?
public void removeAllGeofences(GeofenceControllerListener listener) {
namedGeofencesToRemove = new ArrayList<>();
for (NamedGeofence namedGeofence : namedGeofences) {
namedGeofencesToRemove.add(namedGeofence);
}
this.listener = listener;
connectWithCallbacks(connectionRemoveListener);
}
這似乎並不奏效,除非我重新啓動手機,否則地理柵欄將保持不變。 如何幫助或解釋geofences的工作方式真的有幫助!