Skip to content
Advertisement

Glide for Android: How to include GIFs from Google Drive?

I am trying to include GIFs in my android application. My GIFs are shared as a document on Google Drive with public access enabled. Currently, I’m trying to use Glide to include the GIFs.

 Glide.with(parent.getContext())
            .asGif()
            .load("https://drive.google.com/uc?id=1-QKgZ76K3EZQlbXyY3wI57FA8k31JmrA")
            .into(imageView);

However, although there is no error, the GIF does not display on my phone, even after a long time(internet issues shouldn’t be the problem).

It appears that this is only a problem for GIFs on google drive. Trying to show an internet GIF such as this one works on my Android phone.

How can I show GIF files on Google Drive with Glide on my Android device?

Advertisement

Answer

It should work. Because Glide trying to fetch image which type you specified. I just tried it and its work. it loads too late. If you wait a bit, you will see that it can be loaded. You can test it more easily if you upload a lower resolution gif file to Drive.

Test

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement