0

this is my code to download image into bitmap

 if (null != url) {
                try {
                    test(url,baseActivity);
                    final Bitmap bitmap = BitmapFactory.decodeStream((InputStream) new URL(url).getContent());
                    baseActivity.runOnUiThread(new Runnable() {

                        @Override
                        public void run() {
                            imageView.setImageBitmap(bitmap);
                        }
                    });

                } catch (Exception e) {
                    loadDefaultImage(context, imageView, resourceName, baseActivity);
                }
            }

but I am getting an exception

javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

Is their any way to add certificates before this image download

Martin j
  • 471
  • 1
  • 9
  • 28
  • Does this answer your question? [Trust Anchor not found for Android SSL Connection](https://stackoverflow.com/questions/6825226/trust-anchor-not-found-for-android-ssl-connection) – javdromero Aug 12 '21 at 20:57

0 Answers0