INNER CODE UNIT · Kotlin

PreferencesHelper

bufferapp/android-clean-architecture-boilerplate · cache/src/main/java/org/buffer/android/boilerplate/cache/PreferencesHelper.kt:13

class PreferencesHelper @Inject constructor(context: Context) {

    companion object {
        private val PREF_BUFFER_PACKAGE_NAME = "org.buffer.android.boilerplate.preferences"

        private val PREF_KEY_LAST_CACHE = "last_cache"
    }

    private val bufferPref: SharedPreferences

    init {
        bufferPref = context.getSharedPreferences(PREF_BUFFER_PACKAGE_NAME, Context.MODE_PRIVATE)
    }

    /**
     * Store and retrieve the last time data was cached
     */
    var lastCacheTime: Long

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…