Created
May 14, 2018 13:27
-
-
Save alfianyusufabdullah/06692c85e68fea02aad9c8c636063e45 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.alfianyusufabdullah.produkhalal | |
import android.content.Context | |
import android.content.SharedPreferences | |
class SessionManager(context: Context) { | |
private var sharedPreferences: SharedPreferences = context.getSharedPreferences("PREF", Context.MODE_PRIVATE) | |
fun saveKey(key: String) { | |
val prefEditor = sharedPreferences.edit() | |
prefEditor.putString("KEY", key) | |
prefEditor.apply() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment