How to develop an offline-first native Android app

后端 未结 3 718
后悔当初
后悔当初 2021-02-04 13:09

We are developing a native Android app (iOS and web to follow) where users can collaboratively create an album.

We want as seamless as possible experience when device is

相关标签:
3条回答
  • 2021-02-04 13:22

    I am working on a project at the moment, and we need to track deliveries and verify deliveries even when user is offline. The approach I use is to make use of this ContentProvider plugin Simple Content Provider. And I check if there's internet or not, and if there's none. It stores the data to the provider and change whatever needs to be changed in the DATABASE and make my user believe he or she has completed the order. And I've a SyncAdapter waiting for the internet to come on. And, I've a push service too to refresh the database once there's a change in the database. Having an understanding of Google Cloud Messaging would save your user a lot of battery life. There might be better options out there. But, from my little experience with Android that's how my little help could be.

    0 讨论(0)
  • 2021-02-04 13:23

    You can check out an open source api for this called Wendy the most amazing thing about it is that it uses your existing architecture.

    0 讨论(0)
  • 2021-02-04 13:34

    Did you had a look in CouchBase Server and CouchBase Lite?

    They provide a powerfull tool called the SyncGateway wich handle for you all the syncronisation and the merging of the datas between the server and the internal database. You don't have to code anything in your mobile App for the synchonisation.

    Couchbase Lite is availbe for iOS and Android. There is also a plugin for Cordova/PhoneGap available.

    I never had any problem to compile it, just for iOS keep in mind to compile for iOS6+, it does not work with iOS5

    0 讨论(0)
提交回复
热议问题