public void storeFenceId(@NonNull String fenceId){
  Set<String> setTmp=mPrefs.getStringSet(mPrefix + FENCE_ID_SET_KEY,null);
  HashSet<String> fenceIdSet;
  if (setTmp == null) {
    fenceIdSet=new HashSet<>();
  }
 else {
    fenceIdSet=new HashSet<>(setTmp);
  }
  SharedPreferences.Editor editor=mPrefs.edit();
  fenceIdSet.add(fenceId);
  editor.putStringSet(mPrefix + FENCE_ID_SET_KEY,fenceIdSet);
  editor.apply();
}

public void storeFenceId ( @ NonNull String fenceId ) { Set < String > setTmp = mPrefs . getStringSet ( mPrefix + FENCE_ID_SET_KEY , null ) ; HashSet < String > fenceIdSet ; if ( setTmp == null ) { fenceIdSet = new HashSet < > ( ) ; } else { fenceIdSet = new HashSet < > ( setTmp ) ; } SharedPreferences . Editor editor = mPrefs . edit ( ) ; fenceIdSet . add ( fenceId ) ; editor . putStringSet ( mPrefix + FENCE_ID_SET_KEY , fenceIdSet ) ; editor . apply ( ) ; }
stores immediately the given fence id to the store
