All Projects → mukeshsolanki → Easypreferences

mukeshsolanki / Easypreferences

Licence: mit
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!

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Easypreferences

Harmony
Multi-process SharedPreference implementation without ContentProvider
Stars: ✭ 27 (-20.59%)
Mutual labels:  sharedpreferences
Gradle Kotlin Aspectj Weaver
A Gradle plugin that allows you to weave your compiled Java and Kotlin files with AspectJ
Stars: ✭ 14 (-58.82%)
Mutual labels:  gradle
Gradle Dependencies Plugins Helper Plugin
This is an IntelliJ IDEA plugin for searching dependencies/plugins from JCentral/GradlePlugins inside Gradle projects.
Stars: ✭ 31 (-8.82%)
Mutual labels:  gradle
Bestnote
👊 持续更新,Java Android 近几年最全面的技术点以及面试题 供自己学习使用
Stars: ✭ 841 (+2373.53%)
Mutual labels:  gradle
Jaxws Samples
Small example projects using JAX-WS technologies.
Stars: ✭ 11 (-67.65%)
Mutual labels:  gradle
Gradle Intellij Plugin
Plugin for building plugins for IntelliJ IDEs
Stars: ✭ 912 (+2582.35%)
Mutual labels:  gradle
Android Cookbook Examples
Contributed code examples from O'Reilly Android Cookbook. See #user-content-table README below!
Stars: ✭ 935 (+2650%)
Mutual labels:  gradle
Scala Cypher Dsl
A type-safe Cypher Query Language DSL for Scala.
Stars: ✭ 34 (+0%)
Mutual labels:  gradle
Mcimage
Android Gradle Plugin -- Auto Check big image and compress image in building.
Stars: ✭ 872 (+2464.71%)
Mutual labels:  gradle
Example Kotlin Springboot Graphql
Projeto de exemplo com API GraphQL com dois crud’s simples, utilizando Kotlin, Spring Boot, Gradle etc.
Stars: ✭ 28 (-17.65%)
Mutual labels:  gradle
Refreshversions
Life is too short to google for dependencies and versions
Stars: ✭ 841 (+2373.53%)
Mutual labels:  gradle
Mlcache
A library make cache easily
Stars: ✭ 9 (-73.53%)
Mutual labels:  sharedpreferences
Login Sample
A simple Android app that allows users to sign up / login / logout.
Stars: ✭ 28 (-17.65%)
Mutual labels:  gradle
Gradle Defaults
Plugin providing opinionated defaults for Gradle projects.
Stars: ✭ 7 (-79.41%)
Mutual labels:  gradle
Go4droid
build an android app (with go bindings) in Docker
Stars: ✭ 32 (-5.88%)
Mutual labels:  gradle
Plantuml Gradle Plugin
Gradle plugin to build PlantUML diagrams from code (for living and up-to-date documentation)
Stars: ✭ 27 (-20.59%)
Mutual labels:  gradle
Candyview
Implement any RecyclerView in just 1 Line. CandyView handles everything for you.
Stars: ✭ 15 (-55.88%)
Mutual labels:  gradle
Quiz
An android application which uses Open Trivia Api.
Stars: ✭ 34 (+0%)
Mutual labels:  gradle
Notes
📝 Migrated to(迁移至) https://github.com/Kuangcp/Note 当前仓库已经废弃, 对应的博客网站:
Stars: ✭ 33 (-2.94%)
Mutual labels:  gradle
Gradle Plugins
collection of gradle plugins
Stars: ✭ 28 (-17.65%)
Mutual labels:  gradle

Android Shared Preferences



A simple easy to use library that helps you quickly store and retrive data from shared preferences

Supporting Android Easy Preferences

Android Easy Preferences is an independent project with ongoing development and support made possible thanks to donations made by these awesome backers. If you'd like to join them, please consider:

How to integrate into your app

Integrating 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.

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.mukeshsolanki:easypreferences:<latest-version>'
}

How to use the library

Okay seems like you integrated the library in your project but how do you use it? Well its really easy just follow the steps below.

 //Create a new instance of EasyPreferences
 val prefs = EasyPreferences.defaultPrefs(this)

 //use that instance to save data
 prefs["TestKey"] = "HelloWorld"; //Save's a string value in your preferences
 prefs["Key2"] = 1; //Save's a int value in your preferences

 //use that instance to retrieve data
 val value: String? = prefs["TestKey"]; //retrives the data from preferences
 val defaultVal: Int? = prefs["Key2", 100] //retrives the data from preferences or default values if it does not exists

That's pretty much it. Looks like your all done here.

Author

Maintained by Mukesh Solanki

Contribution

GitHub contributors

License

MIT License

Copyright (c) 2018 Mukesh Solanki

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].