I\'m trying to load image stored on aws S3 into my android app using Picasso but I am getting a blank image with no errors in my logcat and nothing to me from general debugging
write below code to load image in Picasso.
variables:-
String file_path -->> this is your image file path
Imageview mViewHolder.img_post_photo -->> this is your imageview to load image.
Picasso.with(context) .load(file_path) .placeholder(R.mipmap.ic_launcher) .error(R.mipmap.ic_launcher) .into(mViewHolder.img_post_photo, new Callback() { @Override public void onSuccess() { } @Override public void onError() { Picasso.with(context) .load(file_path) .placeholder(R.mipmap.ic_launcher) .error(R.mipmap.ic_launcher) .into(mViewHolder.img_post_photo); } });
Set dependencies in your app build.gradle file:-
compile 'com.squareup.picasso:picasso:2.5.2'
hope this code helps you.