I am trying to load this http://assets.myntassets.com/v1/images/style/properties/Jockey-Men-Black-Innerwear-Vest-9926-0105_435418e1b17c4d0c5583dd33ba24193d_images.jpg
url using picasso. On checking the logs it's showing errored
. But when I tried the same url by:
InputStream is = (InputStream) new URL(url).getContent();
Bitmap d = BitmapFactory.decodeStream(is);
The image is loading. It is very strange. Could not figure why it is happening though.
Here is the logcat:
D/Picasso (27123): Main created [R9] Request{http://assets.myntassets.com/v1/images/style/properties/Jockey-Men-Black-Innerwear-Vest-9926-0105_435418e1b17c4d0c5583dd33ba24193d_images.jpg resize(720,1184) centerInside}
D/Picasso (27123): Dispatcher enqueued [R9]+7ms
D/Picasso (27123): Main created [R10] Request{http://assets.myntassets.com/v1/images/style/properties/Jockey-Men-Black-Innerwear-Vest-9926-0105_435418e1b17c4d0c5583dd33ba24193d_images.jpg resize(720,1184) centerInside}
D/Picasso (27123): Hunter executing [R9]+15ms
D/Picasso (27123): Hunter removed [R9]+21ms from
D/Picasso (27123): Dispatcher canceled [R9]+21ms
D/Picasso (27123): Dispatcher enqueued [R10]+16ms
D/Picasso (27123): Hunter executing [R10]+16ms
D/Picasso (27123): Dispatcher retrying [R10]+538ms
D/Picasso (27123): Hunter executing [R10]+542ms
D/Picasso (27123): Dispatcher retrying [R10]+1057ms
D/Picasso (27123): Hunter executing [R10]+1062ms
D/Picasso (27123): Dispatcher batched [R10]+1586ms for error (will replay)
Code for picasso:
Picasso.with(context)
.load(url)
.resize(height,width)
.centerInside()
.into(imgView);
Where height
and width
for this particular case is 720
and 1184
respectively.