code: public static void removeContentFromSharedPreferences(SharedPreferences sharedPreferences, String key ) {
  
  		Editor editor = sharedPreferences.edit();
  		String msg = sharedPreferences.getString(key, null);
  		editor.remove(key);
  		editor.commit();
  	}
docs: Remove the key from SharedPreferences