This is a very simple Key-Value Database for Android. It is a wrapper around the inbuilt SQLite Db - so, it won't bloat your app size!
It is fast, easy to integrate, and useful for every project.
Add this to the app level build.gradle
compile 'com.madhavanmalolan.android:bucketkeyvaluedb:0.0.1'
Every record stored contains
- Bucket
- Key
- Value
Initiate object :
KeyValDbHelper dbHelper = KeyValDbHelper(context);
Put:
dbHelper.put(BUCKET_NAME,KEY,VALUE);
dbHelper.put(BUCKET_NAME,KEY); // equivalent to dbHelper.put(BUCKET_NAME, KEY,"")
Get :
String value = dbHelper.get(BUCKET_NAME, KEY);
List<String> keys = dbHelper.getKeys(BUCKET_NAME);
Support for more data types
PRs open!
MIT