Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Offline Android application with online syncing

I am developing an Android application that would have an offline data in start and online syncing. That means: user clicks on an item and application reads data for that item from offline (SQLite database or file) and displays that Activity with data (text, picture, movie etc.). At the same time (if online) application goes to webservice in background and downloads data if version of data is newer that version on mobile device, replaces data in background and tells user, that newer data is available (if user is still on the same item - same Activity). If isn't, application automatically reads new data the next time user clicks on the same item.

Is it SQLite on the phone the best way for that or file? Can I put SQLite with offline data to expansion file, when uploading .APK to Google Play?

like image 992
Loadeed Avatar asked Jun 01 '26 19:06

Loadeed


1 Answers

The answer depends on what type of data your application is working with. If you have lots of data files (pictures, movies,mp3s) you probably want to store both the files on the phone, and store the dates and version and file link information in the SQLite database so that you know when they need to be updated.

The expansion file is probably not what you are looking for. It is really intended for large data sets of infrequently changing data such as huge 3d textures or large videos being referenced in a game.

like image 67
RightHandedMonkey Avatar answered Jun 03 '26 10:06

RightHandedMonkey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!