I am writing a google login for my android app (in Java). I am fetching the user image url and trying to display it in the users frontend xml activity file. I know that glide needs the image url to end with an image type ending, but Im not sure how to get the image url so it includes that in its link.
For example when I fetch my image url I get the following link: https://lh3.googleusercontent.com/a/AATXAJwqzB4ZVAwAcHydr52ME9Ewj3jZxYcR3SZU4ra9=k-s256
Here is my code:
import com.bumptech.glide.Glide;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
private FirebaseAuth Auth;
...
Auth = FirebaseAuth.getInstance();
FirebaseUser user = Auth.getCurrentUser();
String iconURL = user.getPhotoUrl().toString();
Glide.with(MainActivity.this).asBitmap().load(iconURL).into(userImg);