MongoDB Realm Android SDK¶
On this page
The MongoDB Realm Android SDK allows you to use Realm Database and backend Realm apps from Android applications written in Java or Kotlin.
The Android SDK does not support Java or Kotlin applications written for environments other than Android.
Local Realm Database¶
With the MongoDB Realm Android SDK, you can access objects stored in a local instance of Realm Database. With Realm Database, you can:
Define an Object Schema¶
Define your object schema with annotated Kotlin or Java classes:
Query Realm Database¶
Query for stored objects using Android-native queries:
Update Live Objects¶
Update objects in Realm Database by updating field values on an instance of the object within a transaction:
Watch for Object Updates¶
Receive object updates and notifications automatically when objects stored in Realm Database change:
Always Access the Latest Data¶
Live objects keep all instances of an object up to date at all times:
To get started with Realm Database, try our Local-only Quick Start.
Realm apps are backends for client applications hosted by MongoDB in the cloud. They provide the ability to synchronize data stored in Realm Database, called Realm Sync, as well as a layer of backend functionality collectively called App Services. The MongoDB Realm Android SDK optionally contains the ability to access these Realm apps running in the cloud. In addition to local Realm Database in the SDK, Realm apps provide the following functionality:
Automatically sync data between realms on client devices and your backend MongoDB Atlas data store with Realm 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 Realm app using a MongoDB Atlas database.
- Execute logic in your backend Realm app from a client application using Functions.
- React to events in your backend Realm app using Triggers.
To get started with MongoDB Realm, try the our Quick Start with Sync.
For practical code samples of common tasks in Realm Database and Realm apps, take a look at the Examples.
Realm Apps Examples