Docs Menu

Interface RealmChangeListener

On this page

  • io.realm
  • Method Summary
  • Method Detail
  • onChange

RealmChangeListener can be registered with a Realm , RealmResults or RealmObject to receive a notification about updates.

When registered against a Realm you'll get notified when a Realm instance has been updated. Register against a RealmResults or RealmObject to only get notified about changes to them.

Realm instances on a thread without an android.os.Looper cannot register a RealmChangeListener.

All io.realm.RealmObject and io.realm.RealmResults will automatically contain their new values when the onChange(Object) method is called. Normally this means that it isn't necessary to query again for those objects, but just invalidate any UI elements that are using them. If there is a chance that a object has been been deleted, it can be verified by using RealmObject.isValid() .

See also:
Modifier and Type
Method and Description
public void
T t

Called when a transaction is committed.

public void onChange (
T t
Called when a transaction is committed.
←  Interface RealmAsyncTaskInterface RealmCollection →
Give Feedback
© 2022 MongoDB, Inc.


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