简体   繁体   中英

Connecting to database on Android using room

I have been looking into databases and the persistence library Room for allowing live updates to my android application but I am struggling to grasp how Room really communicates to databases. I am not sure I have the right idea of how it is meant to be used.

What I am imagining is connecting my android app to a remote database, users on the app can make changes and when those changes are pushed to the database it automatically updates all other active users data from that database. If it is relevant this is part of a google maps application I am running.

(I am not concerning myself with any security measures right now as this is just for proof of concept)

Is everything I need to do this a part of the Room library or are there pieces that I am missing? If so what are the recommended libraries for this. Once again the pieces that I need are this:
1. Connect to remote database
2. Pull values from database to initialize application
3. Make changes to database values from the app (admin mode)
4. Push those changes to remote database
5. Update all other active apps running on other android devices with the new changes on the database

If I am completely off point I would appreciate if someone could point me in the correct direction.

Is everything I need to do this a part of the Room library or are there pieces that I am missing? I

Room has nothing to do with any of that.

Room is for a local SQLite database on the device. Room has nothing to do with communicating with your Web service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM