0

I want to load some images that come from google drive using Glide with GlideSlider

But everytime I try to download an image through url an IO error comes up because I don't have permission..

What I'm doing:

requestOptions = new RequestOptions();
    requestOptions.centerCrop();

    for (int i = 0; i < url_fotos.size(); i++) {
        TextSliderView sliderView = new TextSliderView(activity);
        // if you want show image only / without description text use DefaultSliderView instead

        // initialize SliderLayout
        sliderView
                .image(url_fotos.get(i))
                .setRequestOption(requestOptions)
                .setBackgroundColor(Color.WHITE)
                .setProgressBarVisible(true)
                .setOnSliderClickListener(new BaseSliderView.OnSliderClickListener() {
                    @Override
                    public void onSliderClick(BaseSliderView baseSliderView) {

                    }
                });

        //add your extra information
        sliderLayout.addSlider(sliderView);
    }

    sliderLayout.setPresetTransformer(SliderLayout.Transformer.Default);

I've already tried: "http://username:password@domain.com/url"

And tried this too:

How to use login:pass@ url in Glide on Android?

what else can i do to login in my account?

Rahul Singh Chandrabhan
  • 2,531
  • 5
  • 22
  • 33
Carlos Mion
  • 43
  • 1
  • 10

1 Answers1

0

If the error is related to Authentication then as per this answer :

You should obtain fileId from Google Drive SDK API and then use this url :

https://drive.google.com/uc?export=view&id={fileId}

Nilesh Deokar
  • 2,975
  • 30
  • 53