Realm is a mobile database that runs directly inside phones, tablets or wearables.
This repository holds the library to allow Sync client under Android Realm Object Server to encrypt the token saved in
SharedPreferences, once the user is authenticated. The encryption uses the Android KeyStore available to generate and uses
AES keys for encryption operations.
This library only works together with Realm Java. Please see the detailed instructions in our docs to add Realm to your project.
To add the this library to your project, add the following to you app's dependencies:
This library is only compatible with Realm Java 0.90 and above.
- Need help with your code?: Look for previous questions on the #realm tag — or ask a new question. We activtely monitor & answer questions on SO!
- Have a bug to report? Open an issue. If possible, include the version of Realm, a full log, the Realm file, and a project that shows the issue.
- Have a feature request? Open an issue. Tell us what the feature should do, and why you want the feature.
- Sign up for our Community Newsletter to get regular tips, learn about other use-cases and get alerted of blogposts and tutorials about Realm.
If you want to test recent bugfixes or features that have not been packaged in an official release yet, you can use a -SNAPSHOT release of the current development version of Realm via Gradle, available on OJO
See version.txt for the latest version number.
Building Realm Sync User Encryption
In case you don't want to use the precompiled version, you can build the library yourself from source.
- Download/the JDK 7 or JDK 8 from Oracle and install it.
- Download & install the Android SDK, Android 6.0 (API 23) (for example through Android Studio’s Android SDK Manager)
Once you have completed all the pre-requisites building the library is done with a simple command
That command will generate:
aarfile for the library in
you can also install the
aar into your local maven repository.
See CONTRIBUTING.md for more details!
Realm Sync User Encryption is published under the Apache 2.0 license.
And if you don't like it, please let us know what you would like improved, so we can fix it!