How to provide Context with Dagger2
问题 I am learning Android and I am following some guides for Retrofit2 with RxJava and Dagger2. Now I want to handle no internet connection case. I've found this answer, which seems to be elegant, but I do not understand how to apply it. I've got some NetworkModule , with OkHttpClient provider. I assume I need to create OkHttpClient.Builder with interceptor. So it should look something like this: ` @Provides @Singleton OkHttpClient provideOkHttpClient(Cache cache) { ConnectivityInterceptor ci =