This repository has been archived by the owner on Oct 31, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
params.json
6 lines (6 loc) · 2.89 KB
/
params.json
1
2
3
4
5
6
{
"name": "Android Shared Preferences (Tinydb)",
"tagline": "This class simplifies calls to SharedPreferences in a line of code. It can also do more like: saving a list of strings, integers and saving images. All in 1 line of code!",
"body": "<h1 align=\"center\">Android Shared Preferences</h1>\r\n<p align=\"center\">\r\n <a href=\"https://android-arsenal.com/api?level=9\"> <img src=\"https://img.shields.io/badge/API-9%2B-blue.svg?style=flat\" /></a>\r\n <a href=\"https://jitpack.io/#mukeshsolanki/Android-Shared-Preferences-TinyDB-\"> <img src=\"https://jitpack.io/v/mukeshsolanki/Android-Shared-Preferences-TinyDB-.svg\" /></a>\r\n <a href=\"http://android-arsenal.com/details/1/3805\"> <img src=\"https://img.shields.io/badge/Android%20Arsenal-Android--Shared--Preferences-brightgreen.svg?style=flat\" /></a>\r\n <a href=\"https://travis-ci.org/mukeshsolanki/Android-Shared-Preferences-TinyDB-\"> <img src=\"https://travis-ci.org/mukeshsolanki/Android-Shared-Preferences-TinyDB-.svg?branch=master\" /></a>\r\n <a href=\"https://www.paypal.me/mukeshsolanki\"> <img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" /></a>\r\n <br /><br />\r\n Based on kcochibili's TinyDB (https://github.com/kcochibili/TinyDB--Android-Shared-Preferences-Turbo). This class simplifies calls to SharedPreferences in a line of code. It can also do more like: saving a list of strings, integers and saving object and lists. All in 1 line of code!\r\n</p>\r\n\r\n## How to integrate into your app?\r\n\r\nIntegrating the library into you app is extremely easy. A few changes in the build gradle and your all ready to use TinyDB. Make the following changes.\r\n\r\nStep 1. Add the JitPack repository to your build file. Add it in your root build.gradle at the end of repositories:\r\n\r\n```java\r\nallprojects {\r\n repositories {\r\n ...\r\n maven { url \"https://jitpack.io\" }\r\n }\r\n}\r\n```\r\nStep 2. Add the dependency\r\n```java\r\ndependencies {\r\n compile 'com.github.mukeshsolanki:Android-Shared-Preferences-TinyDB-:1.0.2'\r\n}\r\n```\r\n\r\n## How to use the library?\r\nOkay seems like you integrated the library in your project but **how do you use it**? Well its really easy just follow the steps below.\r\n\r\n```\r\n //Create a new instance of TinyDB\r\n TinyDB tinyDB=new TinyDB(appContext);\r\n \r\n //use that instance to save data\r\n \r\n tinyDB.putString(key,value); //Save's a string value in your preferences\r\n tinyDB.putInt(key,value); //Save's a int value in your preferences\r\n \r\n \r\n //use that instance to retrieve data\r\n tinyDB.getString(key); //retrives the data from preferences or default values if it does not exists \r\n tinyDB.getBoolean(key); //retrives the data from preferences or default values if it does not exists\r\n```\r\nThat's pretty much it. Looks like your all done here.\r\n",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}