Easy SharedPreference Engine foR ANDROid
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
api
gson-serializer
jackson-serializer
processor
sample
tests
.gitignore
.travis.yml
CHANGELOG.md
README.md
license.txt
pom.xml

README.md

esperandro

Easy SharedPreference Engine foR ANDROid

Website with complete tutorial

esperandro is for everybody that uses SharedPreferences in his Android App and is tired of the verbose usage of them.

Load and save preferences without esperandro:

  • String superFancyPreference = preferences.getString("superFancyPreferenceKey", "default value")
  • preferences.edit().putString("superFancyPreferenceKey", superFancyPrefence).commit()

Load and save preferences with esperandro:

  • String superFancyPreference = preferences.superFancyPreferenceKey()
  • preferences.superFancyPreferenceKey(superFancyPreference)

Type safe, easy, less error-prone.

More information about integration and deeper explanation of usage can be found on the website.

For everybody that just thinks "give me the stuff":

buildscript {
    repositories {
      mavenCentral()
    }
    dependencies {
        // replace with the current version of the Android plugin
        classpath 'com.android.tools.build:gradle:1.2.3'
        // the latest version of the android-apt plugin from https://bitbucket.org/hvisser/android-apt
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.5.1'
    }
}

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'


repositories {
     mavenCentral();
}

dependencies {
    compile 'de.devland.esperandro:esperandro-api:2.2.0'
    apt 'de.devland.esperandro:esperandro:2.2.0'

    // optional, if we want to use object serialization but don't provide our own Serializer
    // compile 'de.devland.esperandro:esperandro-gson-addon:2.2.0'
    // or
    // compile 'de.devland.esperandro:esperandro-jackson-addon:2.2.0'
}

Current Travis status

Build Status