Grzegorz Gajewski
07/28/2023, 2:14 PMThe Kotlin SDK does not provide the ability to set and access a default realm in your application. Since you can now share realms, objects, and results across threads, you can rely on a global singleton instead.
So I went with global singleton. But I don’t think this works like I thought it would (similar to room) as now I’m getting:
java.lang.IllegalStateException: [RLM_ERR_WRONG_TRANSACTION_STATE]: The Realm is already in a write transaction
I have a background sync that might write at any given moment, should I open another Realm for that in this case to avoid this crash?Zsolt.bertalan
07/28/2023, 6:09 PMGrzegorz Gajewski
07/28/2023, 6:35 PMchrmelchior
07/29/2023, 12:04 PM