user7943
user7943

Reputation: 913

Firebase Glide not displaying image

Searched many sites and I haven't yet found the answer.

The image isn't being uploaded from Firebase and I honestly don't know what it could be.

Thanks in advance.

Code:

spaceRef = storageRef.child("Users/" + user.getEmail().toString() + "/images/Countries/Spain" /*+ chosenCountry*/);

            Glide.with(ActPhotoViewing.this.getApplicationContext())
                    .load(spaceRef)
                    .into(showImg);

Implementations in .gradle

implementation 'com.firebaseui:firebase-ui-storage:3.2.1'
implementation 'com.github.bumptech.glide:glide:4.4.0'

Upvotes: 1

Views: 487

Answers (1)

Cody W.
Cody W.

Reputation: 376

When using FirebaseUI you need to use the generated API. When you build your project it should generate a GlideApp class that you will use in place of your Glide static calls.

Try:

    GlideApp.with(ActPhotoViewing.this.getApplicationContext())
            .load(spaceRef)
            .into(showImg);

If you are getting errors that GlideApp is not found make sure you are following the instructions here https://github.com/firebase/FirebaseUI-Android/tree/master/storage. Then clean/rebuild your project.

Upvotes: 1

Related Questions