Web Service for Android app

Asked

Viewed 165 times

1

I have a question. Assuming I have a web service saving the data in Mysql, this service is responsible for feeding an Android app. The user accessing the app will sync the data to the device’s local database. If the user makes changes and there is no network signal the data will be saved locally and as soon as it is online it will be synchronized (sent) to the web service. How to do this? Once the database accepted by the android device is Sqlite and the web service database will be in Mysql?

  • Welcome to Stack Overflow! Your question is too broad, try to be more specific in your question. See Help Center How To Ask.

  • Hello. Your question is not very clear. As you said yourself, the Android app does not directly access the database, but rather the service. Storage format differences are abstracted by the service. Why don’t you edit the question to add information about how this service is implemented?

1 answer

1


I don’t see how that would give you a problem of incompatibility. The application would take data from Sqlite turning into objects (Java), these objects would be sent to the web service that would receive them and save in Mysql.

To put it very briefly, Java will query the Sqlite and turn what’s there into objects. These objects will be sent to the web service via HTTP request. The web service will take these objects and save to Mysql.

Anything, better expose where you have trouble seeing that it will work that I will improve the answer.

  • Thank you Cassius, it makes perfect sense to me now what you said.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.