Skip to content

Instantly share code, notes, and snippets.

@Surdi Surdi/
Last active Mar 26, 2018

What would you like to do?
Sample application
package com.securepreferences.sample;
import android.content.SharedPreferences;
import com.securepreferences.SecurePreferences;
* Sample app
public class App extends Application {
protected static App instance;
private SecurePreferences mSecurePrefs;
public App(){
instance = this;
public static App get() {
return instance;
* Single point for the app to get the secure prefs object
* @return
public SharedPreferences getSharedPreferences() {
mSecurePrefs = new SecurePreferences(this, null, "my_prefs.xml");
return mSecurePrefs;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.