Docs Menu

Docs HomeRealm

Realm Java SDK

On this page

  • Local Realm Database
  • Define an Object Schema
  • Query Realm Database
  • Update Live Objects
  • Watch for Object Updates
  • Always Access the Latest Data
  • Atlas App Services
  • Atlas Device Sync
  • App Services
  • Get Started
  • Advanced Guides

The Realm Java SDK allows you to use Realm Database and backend Apps using Java or Kotlin.

Realm's Java SDK enables you to build apps for the following platforms:

  • Android

  • Wear OS

  • Android Automotive OS

  • Android TV

  • Android Things

With the Realm Java SDK, you can access objects stored in a local instance of Realm Database. With Realm Database, you can:

Define your object schema with annotated Kotlin or Java classes:

Query for stored objects using Android-native queries:

Update objects in Realm Database by updating field values on an instance of the object within a transaction:

Receive object updates and notifications automatically when objects stored in Realm Database change:

Live objects keep all instances of an object up to date at all times:


See also:

To get started with Realm Database, try our Local-only Quick Start.

Atlas App Services is a backend for client applications hosted by MongoDB in the cloud. Individual backends, known as Apps, provide the ability to synchronize data stored in Realm Database as well as a layer of backend functionality including user accounts and backend logic. The Realm Java SDK optionally contains the ability to access these Apps running in the cloud. In addition to local Realm Database in the SDK, Apps provide the following functionality:

Automatically sync data between realms on client devices and your backend MongoDB Atlas data store with Device Sync:

  • Use Realm's built-in user management to enable user account creation and user authentication across devices.

  • Store data persistently with permissions in your backend App using a MongoDB data source.

  • Execute logic in your backend App from a client application using Functions.

  • React to events in your backend App using Triggers.


See also:

To get started with Realm, try the our Quick Start with Sync.

Create an Account

To start using the Realm Java SDK in your Android application, see the installation guide to add the SDK dependency. Then check out the Quick Start.

To learn more about the concepts that underlie Realm Database, such as the Asynchronous API, the Query Engine, and more, check out the Fundamentals.

For practical code samples of common tasks in Realm Database and Apps, take a look at the Examples.

Get Started
Realm Apps Examples
←  Sync Data from Multiple ProcessesInstall Realm - Java SDK →
Give Feedback
© 2022 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.