androidandroid-glideimage-loadingbackendless

Glide does not showing images from backendless URL


I'm working on android and using 'backendless' as mbass. I have uploaded a picture in their file storage and I'm given a public URL for image retrieving. I'm retrieving image successfully by simple 'HttpURLConnection' but when I use glide, it always stuck in 'error' instead of retrieving the image. and glide works on other URL's which I copied from Google and it works fine. but I gave backendless URL it doesn't work.

Glide.with(getContext())
                    .load("https://api.backendless.com/CF512434-CCA8-067C-FF92-D76481A44000/v1/files/profilePhotos/mubtada.syedprofileImage.png")
                    .placeholder(R.drawable.ic_video_call_white_36dp)
                    .error(R.drawable.loginbackground)
                    .into(ImageView);

and glide version is: 3.7.0

here is my backendless URL: https://api.backendless.com/CF512434-CCA8-067C-FF92-D76481A44000/v1/files/profilePhotos/mubtada.syedprofileImage.png


Solution

  • I got the image in my device using Glide. Please find the attached image.

    (version: compile 'com.github.bumptech.glide:glide:3.6.1')

    ImageView imageView = (ImageView) findViewById(R.id.imageView);
        Glide.with(this)
                .load("https://api.backendless.com/CF512434-CCA8-067C-FF92-D76481A44000/v1/files/profilePhotos/mubtada.syedprofileImage.png")
                .placeholder(new ColorDrawable(ContextCompat.getColor(MainActivity.this, R.color.placeholder_gray)))
                .error(new ColorDrawable(ContextCompat.getColor(MainActivity.this, R.color.placeholder_gray)))
                .into(imageView);