In my app, I have an SQLite/Room database. I want to introduce synchronisation between the devices of my users. I want to combine my local SQLite/Room DB with a cloud Firebase DB.
I want my SQLite database to be stored in the Firebase Database when the users are logged in, otherwise let it store offline. Any changes to the local database should be reflected in Firebase Database when logged in. Also if a user deletes the local database he/she can retrieve it from Firebase Database. I just want to use Firebase for the synchronization between the local database and Firebase Database.
How can I do it? My app is in Android with Java as a backend.