Android application architecture for truly offline apps
Submitted by Abhik Mitra (@abmitra) on Tuesday, 19 January 2016
Full talk (40 minutes)
To share our learnings of building an offline ready App with the entire community and also take their feedbacks on the same.
Does your App suffer from these problems ?
- High Battery usage - (Because of polling)
- Stale Data - (Because you are not polling)
- Different behavior for different state - (Prefetch data when in Wifi and Charging , make request while the device starts motion).
- Code Organization - (When does this API get called. With wifi ? While the person is walking? with 3g and battery ? )
- Retry of requests - (Sending email while you are in a flight)
How can we solve it ?
- Batching of Requests when the Cellular Antenna is opened.
- Rules and triggers based on push.
- Aggressive API calls depending on device state. (WIFI and Charging/On Boot)
- Readable way to understand when each API will be called. (Code Organization that our PM’s can understand!)
- Retry even when the app is killed.
- Exponential back off when request fails. (Server is down ?)
What is the Application Architecture did we follow to solve these ?
Thats what the talk is about!!
The goal of this talk is to apprise the community of the Android architecture that we follow here in my team at Microsoft.
What this talk is not about ?
- How to store data in a DB
- Particular library like Volley, OkHttp etc
- Microsoft Solutions or Products.
I am an Android Engineer at Microsoft working on the Microsoft Office team. I have spent the last year building Outlook Groups for Android, the new group collaboration app for enterprise. I am also passionate about the web and the Open Source. You can find me @ Github ( https://github.com/abhikmitra )