0

I have a Picasso, loading picures via HTTPS protocol. It work fine on Android 5+, but doesn't work on Android 4. Here is Picasso log:

Main        created      [R2] Request{https://...my_picture.jpg}
06-17 17:56:37.651  D/Picasso: Dispatcher  enqueued     [R2]+1ms 
06-17 17:56:37.651  D/Picasso: Hunter      executing    [R2]+2ms 
06-17 17:56:38.261  D/Picasso: Dispatcher  retrying     [R0]+672ms, [R1]+641ms 
06-17 17:56:38.261  D/Picasso: Hunter      executing    [R0]+673ms, [R1]+643ms 
06-17 17:56:38.261  D/Picasso: Dispatcher  retrying     [R2]+613ms 
06-17 17:56:38.266  D/Picasso: Hunter      executing    [R2]+616ms 
06-17 17:56:38.791  D/Picasso: Dispatcher  retrying     [R0]+1201ms, [R1]+1170ms 
06-17 17:56:38.791  D/Picasso: Dispatcher  retrying     [R2]+1143ms 
06-17 17:56:38.791  D/Picasso: Hunter      executing    [R0]+1203ms, [R1]+1173ms 
06-17 17:56:38.791  D/Picasso: Hunter      executing    [R2]+1144ms 
06-17 17:56:38.801  D/Picasso: Dispatcher  batched      [R2]+1155ms for error

It seems like Picasso tries to load picture by its daemon thread, but it is finished right away. App uses custom RequestHandler for handling encription:

try {
                SecretKey skeySpec = new SecretKeySpec(mImageProvider.getKey(), "AES");
                cipher = Cipher.getInstance("AES/CFB8/NoPadding");
                cipher.init(Cipher.DECRYPT_MODE, skeySpec, new IvParameterSpec(mImageProvider.getKey()));
            } catch (NoSuchAlgorithmException e) {
    ...
    }
Alex Shutov
  • 3,217
  • 2
  • 13
  • 11
  • https://stackoverflow.com/a/30628461/115145 and see if there is a stack trace that tells you anything. – CommonsWare Jun 17 '17 at 15:10
  • For HTTPS Picasso and glide both are not working, i think you should follow this link...https://stackoverflow.com/questions/44244748/why-glide-is-not-loading-https-images-in-android/44246938#44246938 – Aniruddh Parihar Jun 17 '17 at 15:14
  • @AniruddhParihar: Picasso works fine for HTTPS in general, as I have used it for that personally. I have not tried Glide, but if [Google is endorsing it](https://developer.android.com/topic/performance/graphics/manage-memory.html), I would expect that Glide works with HTTPS. You are certainly welcome to provide evidence to the contrary. – CommonsWare Jun 17 '17 at 15:35
  • i am very practical about to image downloading with glide and Picasso, and they both are not works in release build whereas Universal Image loader works perfect. – Aniruddh Parihar Jun 17 '17 at 15:40

0 Answers0