Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to develop an offline-first native Android app

Tags:

People also ask

Can native apps be used offline?

Native mobile apps with offline capability stores both the mobile app's software and its data locally on the mobile device. Offline mobile apps allow the user to run the app, regardless of connectivity.

What are offline-first applications?

Offline-First is a software paradigm where the software must work as well offline as it does online. To implement this, you have to store data at the client side, so that your application can still access it when the internet goes away.


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 not able to connect with server. Something like mentioned in this Hoodie blog but Hoodie is right now for Web and iOS and we are looking for Android right now.

Problem

Maintaining data of albums, friends, pictures (URL/local, not Bitmap) on Client side. Being able to sync offline create/update operations to server at later time, with conflict resolution.

Current research

  1. HTTPResponseCache: Cons: Caches only requests which have been hit once. Plus need different system to handle create/update actions.
  2. App42, Kinvey: Backend-as-a-service; Cons: We want to have own backend.
  3. Microsoft Sync Framework Toolkit: Not sure how well it works with Android
  4. PouchDB
  5. Superbus: Solves a part of the problem

Custom

Maintain data in SQLite on Android and MySQL on server Sync using Android Sync Adapter. However, this can be time consuming and have bugs in starting.

How should this problem be approached?