Ladoken
Ladoken

Reputation: 113

Can you use android Room library to host a database online

Please I am working on a project for a "travel ticket booking android app". I've already learned how to develop android apps but the problem is that my project will need have an updatable online database from which travelling agencies could be added and users also use it to inspect and choose the different travelling options.

My question is: Can you use android Room library to store information in on an external online server instead of the phone local storage?

thanks

Upvotes: 1

Views: 1751

Answers (1)

ror
ror

Reputation: 3500

Let's remember Room is abstraction layer over SQL Lite. Thus in theory you should be able to backup your database into file, publish it somewhere online, download it from other places and restore it somewhere else - but that's very very limiting in case you deal with more then one user.

So practical answer to your question is no, you cannot use Room to store info externally online.

As long as you are in Google ecosystem already, you should probably consider Firebase options they are offering: https://firebase.google.com/docs/database/rtdb-vs-firestore. As long as you are using Room, you'll probably have to build some adapter for your data.

Upvotes: 1

Related Questions