EasySharedPref is a library working as SharedPreferences . We can handling our data using only writing read and write after init. This version is only for saving strings
Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.Kayuemkhan:easysharedpref:1.0.1'
}
That's it!
Should be initialized once in Application.onCreate()
:
EasySharedPref.init(Context context);
Save any texts as saved as key, value pair.
EasySharedPref.write("key","data");
Read as the key name
EasySharedPref.read("key","");
Thank you !