secure-preferences icon indicating copy to clipboard operation
secure-preferences copied to clipboard

How to set `SecurePreferences` as default shared preferences?

Open rmunk opened this issue 8 years ago • 3 comments

I would like the PreferenceManager.getDefaultSharedPreferences(this) method to return my SecurePreferences instance.

So is it possible to set SecurePreferences as default shared preferences and is there maybe some way to have PreferenceFragmentCompat use SecurePreferences?

rmunk avatar Jul 01 '16 10:07 rmunk

+1 would love to use this with PreferenceFragmentCompat

nilsi avatar Sep 21 '16 05:09 nilsi

You should just write a helper class to deal with preferences anyway, and use SecurePreferences there.

ashishkhatri avatar Feb 08 '17 21:02 ashishkhatri

The main issue with using with PreferenceFragmentCompat or any preference screen where the android system/xml if interacting directly with SecurePreferences is that it'll need to reference the hashed key name. It's doable but clunky.

I'll leave this open to update readme/sample app with an example of how to achieve this.

scottyab avatar Mar 28 '17 08:03 scottyab