0

I want to display Image item (PNG) I received from Microsoft Graph API by using Glide then this error happen

D/skia: --- Failed to create image decoder with message 'unimplemented'
D/skia: --- Failed to create image decoder with message 'unimplemented'
D/skia: --- Failed to create image decoder with message 'unimplemented'

Here is my code

 private var image : String = "https://myteam.sharepoint.com/sites/{Sites ID }/{list}/{item}/MyTargetImage.png

GlideApp.with(context)
    .load(image)
    .into(ivImg);

After search for figure out what wrong I found this ImageView RecyclerView Lazy Load and attempt to it without any idea how it work

val circularProgressDrawable = CircularProgressDrawable(this)
            circularProgressDrawable.strokeWidth = 5f
            circularProgressDrawable.centerRadius = 30f
            circularProgressDrawable.start()

            val requestOption : RequestOptions = RequestOptions()
                .placeholder(circularProgressDrawable)
                .error(R.drawable.ic_error_1)
                .diskCacheStrategy(DiskCacheStrategy.ALL)
                .priority(Priority.HIGH)
                .dontAnimate()
                .dontTransform()

            Glide.with(this)
                .load(image)
                .apply(requestOption)
                .into(ImageView)
        }

and it still got the same error. I able to open

https://myteam.sharepoint.com/sites/{Sites ID }/{list}/{item}/MyTargetImage.png

on the browser and it navigate me to the picture. or any idea how to display image from Microsoft Graph API

Plai
  • 21
  • 7
  • I dont think the issue is with Graph API, rather with the implementation how to display the image. (1) To isolate the issue, try the above API call in Microsoft Graph explorer to see if it works for you or not. (2) I used this in past Glide with Kotlin with the following snippet: val media = "https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885_960_720.jpg" if (media !== null) { Glide.with(this) .load(media) .into(imageview) } else { imageview.setImageResource(R.drawable.ic_launcher_background) } – Dev Feb 05 '21 at 16:30
  • above you can replace the val media = the URL that you get from the Graph API!! – Dev Feb 05 '21 at 16:31

0 Answers0