TypedPreferences alternatives and similar packages
Based on the "Utility" category.
Alternatively, view TypedPreferences alternatives based on common mentions on social networks and blogs.
-
StatusBarUtil
A util for setting status bar style on Android App. -
timber
A logger with a small, extensible API which provides utility on top of Android's normal Log class. -
ExpirableDiskLruCache
Java implementation of a Disk-based LRU cache which specifically targets Android compatibility. -
Byte Buddy
Runtime code generation for the Java virtual machine. -
tape
A lightning fast, transactional, file-based FIFO for Android and Java. -
joda-time-android
Joda-Time library with Android specialization -
tray
a SharedPreferences replacement for Android with multiprocess support -
OpenKeychain
OpenKeychain is an OpenPGP implementation for Android. -
AutobahnAndroid
WebSocket & WAMP in Java for Android and Java 8 -
easydeviceinfo
:iphone: [Android Library] Get device information in a super easy way. -
Android-Templates-And-Utilities
Collection of source codes, utilities, templates and snippets for Android development. -
secure-preferences
Android Shared preference wrapper than encrypts the values of Shared Preferences. It's not bullet proof security but rather a quick win for incrementally making your android app more secure. -
greenrobot-common
General purpose utilities and hash functions for Android and Java (aka java-common) -
Androl4b
A Virtual Machine For Assessing Android applications, Reverse Engineering and Malware Analysis -
vector-compat
A support library for VectorDrawable and AnimatedVectorDrawable classes introduced in Lollipop -
CastCompanionLibrary-android
CastCompanionLibrary-android is a library project to enable developers integrate Cast capabilities into their applications faster and easier. -
android_dbinspector
Android library for viewing, editing and sharing in app databases. -
AndroidBillingLibrary
Android Market In-app Billing Library -
motion
An Android library allowing images to exhibit a parallax effect that reacts to the device's tilt -
Colours
A beautiful set of predefined colors and a set of color methods to make your Android development life easier. -
MrVector
[Deprecated] AKA VectorDrawableCompat: A 7+ backport of VectorDrawable -
EasyCamera
Wrapper around the android Camera class that simplifies its usage -
Reservoir
Android library to easily serialize and cache your objects to disk using key/value pairs. -
davdroid
DAVdroid – CalDAV/CardDAV synchronization for Android 4+ devices -
android-validation-komensky
A simple library for validating user input in forms using annotations. -
dspec
A simple way to define and render UI specs on top of your Android UI. -
routable-android
Routable, an in-app native URL router, for Android -
Treasure
Very easy to use wrapper library for Android SharePreferences -
RoboGif
A small utility to record Android device screen to a GIF
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of TypedPreferences or a related project?
README
Typed Preferences
[Typed Preferences Icon](gfx/typedpreferences-icon.png "Typed Preferences Icon")
This library for Android provides classes which allow to store and retrieve settings from the preferences. There is an individual class for each native type:
BooleanPreference
for aboolean
valueDoublePreference
for adouble
valueFloatPreference
for afloat
valueIntPreference
for anint
valueLongPreference
for along
valueShortPreference
for ashort
valueStringPreference
for aString
value
Each class comes with two constructors - one of them allows to ommit the default value.
All classes declare the same methods: get()
, isSet()
, set()
and delete()
.
Here are the method signatures as definied in the StringPreference
class.
public class StringPreference {
public String get() { ... }
public boolean isSet() { ... }
public void set(String value) { ... }
public void delete() { ... }
}
Wrappers for frequently used classes can be found and added in the wiki. Take a look!
How to get the thing running?
Add the library as a dependency to your build.gradle
in case you use Gradle:
dependencies {
compile "info.metadude.android:typed-preferences:{$version}"
}
Or if you use Maven you should be looking for this:
<dependency>
<groupId>info.metadude.android</groupId>
<artifactId>typed-preferences</artifactId>
<version>{$version}</version>
</dependency>
For anything else, go to Maven Central - or just build the library yourself.
Minimum SDK version / API level
The library is available in two different versions. If you need to support API level 8 in your project you must include the latest 1.x.x version. This library version persists the settings synchronously using the commit
method of the SharedPreferences.Editor
. If the minimum SDK version you need to support is API level 9 you can choose the latest 2.x.x version which relies on the apply
method of the SharedPreferences.Editor
. Thereby settings are persisted asynchronously.
For further information please stick to documentation of the SharedPreferences.Editor
interface.
Demo project
Check out the demo project TypedPreferencesDemo
which shows how to use the library.
Tests
Run ./gradlew clean test
to execute the tests.
Feedback
If you use this library and you are happy with it please send a tweet to @tbsprs and feel free to announce your app. I will be happy to list it here.
In case you do not like the library please do not hesitate to open an issue and let me know what can be improved.
Which applications are using this library?
Reference
This library is mainly inspired by the classes which have been published by Jake Wharton in the u2020 project.
Authors
Contributors
License
Copyright 2014-2018 Tobias Preuss
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*Note that all licence references and agreements mentioned in the TypedPreferences README section above
are relevant to that project's source code only.