Same Room db from Remote Service and Activity

6 days ago 6
ARTICLE AD BOX

I wonder if it is okay to use the same Room db in Activity and Remote Service.

Since the Service is remote it resides in a separate process. Is it okay to open the same sqlite db file simultaneously from the Remote Service and the Activity itself? Whether their operations must be manually synchronized via some sort of IPC ?

I mean imagine two writes at the same time initiated by the Remote Service and the Acitivity. Is it error prone or it is handled properly by the Room itself ?

Read Entire Article