I have following code, which doesnot load image offline as intended. It works online well but I need to load image offline too. I have given permission for Writing external storage too. Any idea will be really helpful.
Picasso.with(getContext())
.load(userInfo.getUserPictureUri())
.networkPolicy(NetworkPolicy.OFFLINE)
.resize(80, 80)
.error(R.drawable.profile_picture)
.centerCrop()
.into(imageView_ProfilePictureSide, new Callback() {
@Override
public void onSuccess() {
}
@Override
public void onError() {
// Try again if cache failed
Picasso.with(getActivity())
.load(userInfo.getUserPictureUri())
.error(R.drawable.profile_picture)
.into(imageView_ProfilePictureSide);
}
});