add method clearPreferences when de app show the Dialog