@Override public void onSaveInstanceState(@NonNull Bundle savedInstanceState){
  savedInstanceState.putParcelable(LOCATION_KEY,currentLocation);
  if (lastLocationUpdateTime != null) {
    savedInstanceState.putLong(LAST_LOCATION_UPDATE_TIME_STRING_KEY,lastLocationUpdateTime.getTime());
  }
  if (lastWifiScanTime != null) {
    savedInstanceState.putLong(LAST_WIFI_SCAN_TIME_STRING_KEY,lastWifiScanTime.getTime());
  }
  savedInstanceState.putBoolean(LOGGING_ENABLED_KEY,loggingEnabled);
  super.onSaveInstanceState(savedInstanceState);
}

@ Override public void onSaveInstanceState ( @ NonNull Bundle savedInstanceState ) { savedInstanceState . putParcelable ( LOCATION_KEY , currentLocation ) ; if ( lastLocationUpdateTime != null ) { savedInstanceState . putLong ( LAST_LOCATION_UPDATE_TIME_STRING_KEY , lastLocationUpdateTime . getTime ( ) ) ; } if ( lastWifiScanTime != null ) { savedInstanceState . putLong ( LAST_WIFI_SCAN_TIME_STRING_KEY , lastWifiScanTime . getTime ( ) ) ; } savedInstanceState . putBoolean ( LOGGING_ENABLED_KEY , loggingEnabled ) ; super . onSaveInstanceState ( savedInstanceState ) ; }
stores activity data in the bundle .
