I would like to save some stuff on the SharedPreferences while being on a Interceptor. I can't find a way to do it because i can't find a way to access the context on the Interceptor (so not possible to use PreferencesManager, etc).
public class CookieInterceptor implements Interceptor {
@Override public Response intercept(Chain chain) throws IOException {
PreferenceManager.getDefaultSharedPreferences(Context ??)
}}
Any ideas ?
I'm using AndroidStudio & last version of OkHttp.
Thanks ;)