public static void storeLocation(Context context,LatLng location){
  SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(context);
  SharedPreferences.Editor editor=prefs.edit();
  editor.putLong(PREFERENCES_LAT,Double.doubleToRawLongBits(location.latitude));
  editor.putLong(PREFERENCES_LNG,Double.doubleToRawLongBits(location.longitude));
  editor.apply();
}

public static void storeLocation ( Context context , LatLng location ) { SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( context ) ; SharedPreferences . Editor editor = prefs . edit ( ) ; editor . putLong ( PREFERENCES_LAT , Double . doubleToRawLongBits ( location . latitude ) ) ; editor . putLong ( PREFERENCES_LNG , Double . doubleToRawLongBits ( location . longitude ) ) ; editor . apply ( ) ; }
store the location in the app preferences .
