Debug SharedPreferences on Android

1

Is there any easy way to see everything I have inside my SharedPreferences ? Something like:

SharedPreferences prefs = this.getSharedPreferences( "user_access", Context.MODE_PRIVATE);
Log.i("SharedPreferences", prefs);

Update
With the help of @Piovezan I was able to use the following code:

SharedPreferences prefs = this.getSharedPreferences( "user_access", Context.MODE_PRIVATE);
Map<String, ?> prefs_map = prefs.getAll();

Log.i("debug", prefs_map.toString());
    
asked by anonymous 18.11.2014 / 17:47

1 answer

4

If you look at the SharedPreferences API , you will see that there is a% coop% returns a getAll() with the key-value pairs contained in the preferences.

    
19.11.2014 / 11:56