0

I am receiving a data uri from a remote API using retrofit. I tried many methods yet not able to get the image set on the image view. Please help me in it.

[The data Uri starts with imagedata:image/png;base64,iVBORw0K6IkSfJ5fRAlSZLP64MoSZJ8Xh9ESZLk8/ogSpIkn9cHUZIk+bw+iJIkyef1QZQkST6vD6IkSfJ5fRAl.....]

I used the following code in my activity.

if(response.isSuccessful() && response.body() != null) {
                QRcodeResponse qRcodeResponse= (QRcodeResponse) response.body();
                QRData data = qRcodeResponse.getData();
                String dataString = data.getQrCode().toString();
            Uri uri = Uri.parse(dataString);
                Glide.with(My_qr_codeActivity.this)
                        .load(uri).into(Image_view_myQRcode);
                Log.i("QRCODE :", "The response QR image" + data.getQrCode().toString());
            }

0 Answers0