How should I handle globally no internet exception, so what I want to archive is to display a snackbar every time there is a call. I archived that on each call:
@Override
public void onFailure(@NonNull Call<UserProfileResponse> call, @NonNull Throwable t) {
Snackbar.make(findViewById(android.R.id.content),"Message",Snackbar.LENGTH_LONG).show();
}
I read about adding an Interceptor on OkHttp client, but there I can't get the view for the SnackBar.