Search code examples
javaandroidrealmrealm-mobile-platformrealm-object-server

Realm Object Server on table sync listener on client (android)


Hello I have an android realm (4.1.0) that connected with ROS 2.0.

Configuration contains few tables. Is it possible to have on table change listener on android side? i mean catch an action when item have been inserted or updated on server table (some specific table, only one) and copied to mobile?

I've found that it is possible to have on change listener for data that have been selected from table, but there is not the way i'm looking for, i don't need to have live selection, i need to perform actions when data synced in background. is there any way to do that?

thank you.


Solution

  • We have progress listeners that can tell you when data has been uploaded to the server. See https://docs.realm.io/sync/using-synced-realms/syncing-data#progress-notifications, but if you need to know when a data has been acted upon then the only way of doing that would be to have a boolean field like serverDone and then the server can set that field which will then be synced to the clients.