Retrofit 2 — Support App Offline Mode by Accessing Response Caches

In our introduction to response caching we've motivated developers to integrate response caching to make their apps faster and reduce the used bandwidth. Integrating response caches has another positive side-effect: you can add a simple offline mode to your app!

If your user is in a dark tunnel, you might not be able to display the most up-to-date data, but you can at least show him the last version you've loaded. This even works when he closed your app and/or restarted his phone.

In this tutorial, you'll learn how you can implement this offline mode based on response caching in just a few minutes.

Retrofit Series Overview

Continue reading

University Enrollment Required

Future Students benefit from value packed videos and tutorials.

Enroll to receive exclusive content or sign in if you’re already a Future Student.

Enroll me for $15/mo

Explore the Library

Find interesting tutorials and solutions for your problems.