Skip to content

Latest commit

 

History

History
48 lines (38 loc) · 922 Bytes

README.md

File metadata and controls

48 lines (38 loc) · 922 Bytes

EasySharedPref

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

How to :

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!

In Java Code

Initialize easysharedpref

Should be initialized once in Application.onCreate():

EasySharedPref.init(Context context);

Save/Write Data

Save any texts as saved as key, value pair.

EasySharedPref.write("key","data");

Read Data

Read as the key name

EasySharedPref.read("key","");

Thank you !