Example usage for android.content SharedPreferences getBoolean

List of usage examples for android.content SharedPreferences getBoolean

Introduction

In this page you can find the example usage for android.content SharedPreferences getBoolean.

Prototype

boolean getBoolean(String key, boolean defValue);

Source Link

Document

Retrieve a boolean value from the preferences.

Usage

From source file:com.thejoshwa.ultrasonic.androidapp.util.Util.java

public static boolean isNotificationEnabled(Context context) {
    SharedPreferences prefs = getPreferences(context);
    return prefs.getBoolean(Constants.PREFERENCES_KEY_SHOW_NOTIFICATION, false);
}

From source file:com.thejoshwa.ultrasonic.androidapp.util.Util.java

public static boolean isNotificationAlwaysEnabled(Context context) {
    SharedPreferences prefs = getPreferences(context);
    return prefs.getBoolean(Constants.PREFERENCES_KEY_ALWAYS_SHOW_NOTIFICATION, false);
}

From source file:com.thejoshwa.ultrasonic.androidapp.util.Util.java

public static boolean isLockScreenEnabled(Context context) {
    SharedPreferences prefs = getPreferences(context);
    return prefs.getBoolean(Constants.PREFERENCES_KEY_SHOW_LOCK_SCREEN_CONTROLS, false);
}

From source file:com.thejoshwa.ultrasonic.androidapp.util.Util.java

public static boolean isStreamProxyEnabled(Context context) {
    SharedPreferences prefs = getPreferences(context);
    return prefs.getBoolean(Constants.PREFERENCES_KEY_USE_STREAM_PROXY, false);
}

From source file:com.thejoshwa.ultrasonic.androidapp.util.Util.java

public static boolean shouldDisplayBitrateWithArtist(Context context) {
    SharedPreferences prefs = getPreferences(context);
    return prefs.getBoolean(Constants.PREFERENCES_KEY_DISPLAY_BITRATE_WITH_ARTIST, true);
}

From source file:com.thejoshwa.ultrasonic.androidapp.util.Util.java

public static boolean shouldUseFolderForArtistName(Context context) {
    SharedPreferences prefs = getPreferences(context);
    return prefs.getBoolean(Constants.PREFERENCES_KEY_USE_FOLDER_FOR_ALBUM_ARTIST, false);
}

From source file:com.thejoshwa.ultrasonic.androidapp.util.Util.java

public static boolean shouldShowTrackNumber(Context context) {
    SharedPreferences prefs = getPreferences(context);
    return prefs.getBoolean(Constants.PREFERENCES_KEY_SHOW_TRACK_NUMBER, false);
}

From source file:com.thejoshwa.ultrasonic.androidapp.util.Util.java

public static boolean getMediaButtonsPreference(Context context) {
    SharedPreferences prefs = getPreferences(context);
    return prefs.getBoolean(Constants.PREFERENCES_KEY_MEDIA_BUTTONS, true);
}

From source file:com.thejoshwa.ultrasonic.androidapp.util.Util.java

public static boolean getShowNowPlayingPreference(Context context) {
    SharedPreferences prefs = getPreferences(context);
    return prefs.getBoolean(Constants.PREFERENCES_KEY_SHOW_NOW_PLAYING, true);
}

From source file:com.thejoshwa.ultrasonic.androidapp.util.Util.java

public static boolean getGaplessPlaybackPreference(Context context) {
    SharedPreferences prefs = getPreferences(context);
    return prefs.getBoolean(Constants.PREFERENCES_KEY_GAPLESS_PLAYBACK, true);
}