Example usage for android.app Activity getSharedPreferences

List of usage examples for android.app Activity getSharedPreferences

Introduction

In this page you can find the example usage for android.app Activity getSharedPreferences.

Prototype

@Override
    public SharedPreferences getSharedPreferences(String name, int mode) 

Source Link

Usage

From source file:com.breadwallet.tools.manager.SharedPreferencesManager.java

public static boolean getPhraseWroteDown(Activity context) {
    SharedPreferences prefs = context.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE);
    return prefs.getBoolean(BRConstants.PHRASE_WRITTEN, false);

}

From source file:com.breadwallet.tools.manager.SharedPreferencesManager.java

public static long getSecureTime(Activity activity) {
    SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE);
    return prefs.getLong(BRConstants.SECURE_TIME_PREFS, System.currentTimeMillis() / 1000);
}

From source file:com.breadwallet.tools.manager.SharedPreferencesManager.java

public static long getPhraseWarningTime(Activity activity) {
    SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE);
    return prefs.getLong(BRConstants.PHRASE_WARNING_TIME, 0);
}

From source file:com.breadwallet.tools.manager.SharedPreferencesManager.java

public static int getLimit(Activity activity) {
    SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE);
    return prefs.getInt(BRConstants.LIMIT_PREFS, BRConstants.HUNDRED_BITS);
}

From source file:com.breadwallet.tools.manager.SharedPreferencesManager.java

public static boolean getAllowSpend(Activity activity) {
    SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE);
    return prefs.getBoolean(BRConstants.ALLOW_SPEND, true);
}

From source file:com.breadwallet.tools.manager.SharedPreferencesManager.java

public static boolean getGeoPermissionsRequested(Activity activity) {
    SharedPreferences prefs = activity.getSharedPreferences(BRConstants.PREFS_NAME, Context.MODE_PRIVATE);
    return prefs.getBoolean(GEO_PERMISSIONS_REQUESTED, false);
}

From source file:com.breadwallet.tools.manager.SharedPreferencesManager.java

public static float getRate(Activity context) {
    SharedPreferences settingsToGet = context.getSharedPreferences(BRConstants.PREFS_NAME, 0);
    return settingsToGet.getFloat(BRConstants.RATE, 1);
}

From source file:com.breadwallet.tools.manager.SharedPreferencesManager.java

public static int getStartHeight(Activity context) {
    SharedPreferences settingsToGet = context.getSharedPreferences(BRConstants.PREFS_NAME, 0);
    return settingsToGet.getInt(BRConstants.START_HEIGHT, 0);
}

From source file:com.breadwallet.tools.manager.SharedPreferencesManager.java

public static int getLastBlockHeight(Activity context) {
    SharedPreferences settingsToGet = context.getSharedPreferences(BRConstants.PREFS_NAME, 0);
    return settingsToGet.getInt(BRConstants.LAST_BLOCK_HEIGHT, 0);
}

From source file:com.breadwallet.tools.manager.SharedPreferencesManager.java

public static boolean getTipsShown(Activity context) {
    SharedPreferences settingsToGet = context.getSharedPreferences(BRConstants.PREFS_NAME, 0);
    return settingsToGet.getBoolean(BRConstants.TIPS_SHOWN, false);
}