How to develop an offline-first native Android app

后端 未结 3 717
后悔当初
后悔当初 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.

提交回复
热议问题