Vyshakh Amarnath
Vyshakh Amarnath

Reputation: 666

update SQLite data from tablet to mobile in android

I am creating an app that is for my grandmother as she suffers from Alzheimer. I would like to have a feature where I could remotely update the schedules from my mobile to her tablet .Now I am thinking of various possibilities to have the same set of data in both Tablet and Mobile for example:Authenticating the application with caretaker's username and password requires checking data from SQLite table.Now how is it possible to have same set of SQLite data in both mobile and tablet. Any update on SQLite table in tablet should also update the mobile SQLite database. -I don't want any cloud service or third party apis. -One way I think is have a PHP enabled server and have both devices integrated to it. -Is there a way to have the tablet send data directly to mobile through HTTP?(Of course mobile should be connected to Wifi but that is fine!)

Upvotes: 0

Views: 408

Answers (1)

dutt
dutt

Reputation: 8209

As I see it there are two ways you can go.

Server based: You write a server and then post updates to it, the tablets periodically pulls any updates from it, you need to write a web server in language and framework of your choice communicating over JSON or XML with phone and tablet. This has the advantage that the phone can post multiple updates and the tablet can pull whenever it has net available.

Direct: Use (tcp) sockets to send commands from the phone to the tablet over the net. If you know that both will be connected to the internet or the same wifi all the time this will be more efficient, and you don't need to write a server.

Upvotes: 1

Related Questions