Android, Android Retrofit, Retrofit, Interceptors.
app functionality even in the absence of a network connection. val offlineInterceptor = Interceptor { chain -> var request = chain.request() if (!isOnline()) { request = request.newBuilder() .cacheControl(CacheControl.FORCE_CACHE) .build() } chain.proceed(request) } Integrating with Retrofit 🚀: