database - data storage in android - combining SQlite with myPHP -


i trying develop application in have data base on server in phpmyadmin i'm taking data parsing json objects, of course different users have different data , users share same data. problem when im taking data server taking long , if store on device more efficient users share same data (they can delete , add data). problem - how can combine sqlite myphp in first time user sign in data wil taken server , inserted device data base , next time user sign in data taken device data base. , if make changes update both data bases

you'll have replicate database schema on both server client.

fetch results first time server. , store in local sqilite. , then, store flag in sharedpreferences know in future have fetch results local db.

after that, if change in made in local db, you'll have update @ server also. that, depends on use case how fast want update on server.

if don't want right away, can wait , batch several calls , post server using job scheduler api.

if want changes on server should happen possible, spin off new thread , post them right away.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -