Ejemplo n.º 1
0
 /*
  * Logout button click action
  */
 public void logOut(View v) {
   PlaceItDb instance = PlaceItDb.getInstance();
   List<PlaceIt> placeIts = PlaceItList.all();
   for (PlaceIt placeIt : placeIts) {
     // disable all trackLocations
     placeIt.trackLocation(this, false);
     // disable all alarms
     placeIt.setAlarm(this, false);
     // drop the current table
     // instance.delete(placeIt);
   }
   // disable the current user
   SyncClient.logOut();
   // stop checking for Categorical
   stopService(checker);
   // stop syncing
   stopService(syncing);
   // return to login window
   Intent returnSignUp = new Intent(this, MainActivity.class);
   startActivity(returnSignUp);
   finish();
 }