Created
July 4, 2022 12:14
-
-
Save wajahatkarim3/9929606b5220e23478fcc8af88ea256d 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
| val preferences = this.getSharedPreferences("SOME_NAME", Context.MODE_PRIVATE) | |
| // Reading the values from Preferences | |
| val myStr = preferences.getString("myStrKey", "DEFAULT_STR") | |
| val myLong = preferences.getLong("myLongKey", 0) | |
| val myInt = preferences.getInt("myIntKey", 1) | |
| val myDouble = preferences.getDouble("myDoubleKey", 0.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment