Skip to content

EasySharedPref is a library working as SharedPreferences . We can handling our data using only writing read and write after init.

Notifications You must be signed in to change notification settings

Kayuemkhan/easysharedpref

Repository files navigation

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 !

About

EasySharedPref is a library working as SharedPreferences . We can handling our data using only writing read and write after init.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages