Skip to content

mkiisoft/KeySaver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 

Repository files navigation

KeySaver

Awesome GitHub version Android

Light & Fast Shared Preference. Only 2Kb

KeySaver is a data store simplifier to save, get, check and remove keys and values with a single line.

Install

Android Studio:

Save KeySaver.jar file, copy into your "libs" folder (normally inside "app" folder) > Right Click your project > Open Module Settings > Over "app" go to Dependencies tab and hit the + button > Select "File Dependency" and click "KeySaver.jar" > OK to finish

Eclipse:

Save KeySaver.jar file and copy into your "libs" folder.

Changelog

First release v.1.0

Features:

  • Save boolean, int and String
  • Check if value exist or not with one line
  • Remove key quick and clean
  • Get values with one line without parse methods
  • Get a list of saved keys/values
  • Works with Activity and any Context (Fragments, Adapters, etc)
  • Extra: Get IMEI and DeviceID

How to use:

Save Data

KeySaver.saveShare(this, "your-key", "your-value");

Check Data

if(KeySaver.isExist(this, "your-key")){
            // Do anything here if true
            Toast.makeText(this, "hello world!", Toast.LENGTH_SHORT).show();
        }

Get Data

KeySaver.getStringSavedShare(this, "your-key");
KeySaver.getBoolSavedShare(this, "your-key");
KeySaver.getIntSavedShare(this, "your-key");

Remove Data

KeySaver.removeKey(this, "your-key");

About

Light & Fast Shared Preference

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published