Is there a way to check if loading Glide image is successful?

Viewed 45

I am using glide to inflate image. And there is a function .error() that allows to inflate some image in case of error. But is there a way to catch the exception when .load("url") been called? Because instead of inflating default icon I want to call some other function

Glide.with(context)
            .load(imageLink)
            .error(myFunction()) // here instead of image need to catch exception from .load()
            .into(imageView)
0 Answers
Related