Realm Java 0.79.0

We recently released a Realm Java update to this website and to Maven. This release includes support for primary keys, and Realm now adds 70% less weight to your APK!

Primary Keys

You’ve been asking for primary keys ever since our first java release — finally, we’re happy to announce that this much-needed feature is supported by Realm. Simply use the @PrimaryKey annotation. Only String and integer (short, int, and long) fields can be used as primary keys.

ARM64 support

Nexus 9 users rejoice. The ARM64 processor is now among the architectures we support.

Realm Library Size Decreased by ~70%

Realm used to add around 3MB to your APK size. Thanks to some C++ optimizations, this should now be down to about 800KB for ARM devices, if you use a split APK. You can read more about how you can achieve this on our blog.

Minor improvements

  • We have added the method RealmQuery.not() which can negate a condition. It is very useful with beginGroup()/endGroup() when you need to negate a part of a condition.
  • The error messages have improved a few places, and Realm.deleteRealmFile() will throw an exception when an instance of the Realm is still open.
  • The Realm.allObjectSorted() has been reimplemented for better performance.

Deprecated methods

A number of methods were deprecated in 0.76, and they are now removed. Realm.allObjectsSorted() and RealmQuery.findAllSorted() need to be used instead.


Thanks for reading. Now go forth and build amazing apps with Realm! As always, we’re around on the mailing list, StackOverflow, GitHub, and twitter.