My android app supports multiple user logins.
I user Dagger2 to maintain the UserScope
dependencies which get created and destroyed as user switch happens.
One of these dependencies is an OkHttpClient
for every user, with its own authentication/cookies.
I am looking to use Fresco
for my app, but I am not able to find a way where I can switch the OKHttpClient
at runtime in Fresco, since the initialization only happens once for it.
From the documentation :
OkHttpClient okHttpClient; //my per user session client
ImagePipelineConfig config = OkHttpImagePipelineConfigFactory
.newBuilder(context, okHttpClient)
.build();
Fresco.initialize(context, config);
Any ideas to achieve this multi user scenario with Fresco ?