Realm Blog

Realm for Android

This post announced the launch of Realm for Android in Sept. 2014 – Since then we’ve made many updates and released new features. Check out the latest here in Realm Java.

It looks like this:

Realm realm = Realm.getDefaultInstance();

// All writes are wrapped in a transaction
// to facilitate safe multi threading

// Add a person
Person person = realm.createObject(Person.class);
person.setName("Young Person");


RealmResults<User> result = realm.where(User.class)
                                 .greaterThan("age", 10)  // implicit AND
                                      .equalTo("name", "Peter")
                                      .contains("name", "Jo")

It’s hard to believe Realm for iOS was first released less than 3 months ago — we’ve certainly been busy since that fateful Tuesday morning! We stayed on the front page of HN for a full 24 hours, saw the blogposts pile in, the scores of apps on GitHub, spontaneous meetups about us, invites to speak at conferences and of course a deluge of feature ideas and bug reports — all of them awesome, all of them needed, and all of them reminding us of how much work was left ahead!
Our launch also gave way to tweets like this (and many more…)

We estimate that over 20,000 developers (!!!) were already using Realm just 8 weeks after launch, and that there are ~1,000 Realm apps either already on the App Store or close to being released on the App Store. This includes New York Times-featured social apps like Cloth, venture-backed professional apps such as Breeze, and of course Zynga, who has been using Realm in production since 2012.

Realm for Android

So today, we’re very excited to launch Realm for Android. We tried to maintain the same very simple API, modern design and added a few more really cool things like encryption.

Realm files are also compatible across iOS & Android! You can share them across platforms! Since Realm data uses very little disk space and require no serialization & deserialization, you’ll get much better performance passing realm files around than shipping SQLite databases or chunks of JSON.

How about performance? Well, we’re glad you asked :) For all the API goodness & development productivity we give you, we’re still up to 100x faster that some SQLite ORMs and on average ~10x faster than raw SQLite and common ORMs for typical operations:

Tests run on a Galaxy S3, using the latest available version of each library as of Sept 28, 2014.

UPDATE 11/06/2015: we have significantly updated Realm and the way we do benchmarks on Android and encourage people to refer to these updated results instead (source).

We consciously tried to release Android in an earlier state than what we shipped for iOS, so that we could benefit from wider community feedback (and answer the needs of the many users who needed to go in production with Android this year). Expect the API to be improved quite a bit, especially as we polish advanced features like Encryption and Migrations.

You can get in touch with us to ask questions on Stack Overflow or open an issue on GitHub.

We can’t wait to see what you will build with Realm!

Realm Team

At Realm, our mission is to help developers build better apps faster. We provide a unique set of tools and platform technologies designed to make it easy for developers to build apps with sophisticated, powerful features — things like realtime collaboration, augmented reality, live data synchronization, offline experiences, messaging, and more.

Everything we build is developed with an eye toward enabling developers for what we believe the mobile internet evolves into — an open network of billions of users and trillions of devices, and realtime interactivity across them all.

Get more development news like this

<script async src="//" charset="utf-8"></script>