Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

193
Views
Glide image loading with redirect

I'm trying to load image from url using glide. But the url is redirection to another url and hence the image is not being displayed.

The url is of Amazon s3 and I'm using volley integration with glide

How can I handle this redirection?

public class CustomCache implements GlideModule {
@Override
public void applyOptions(Context context, GlideBuilder builder) {
    try {
        builder.setDiskCache(
                new InternalCacheDiskCacheFactory(context, 41943040)
        );
    } catch (Exception e) {
        e.printStackTrace();
    }

}

@Override
public void registerComponents(Context context, final Glide glide) {
    RequestQueue queue = new RequestQueue( // params hardcoded from Volley.newRequestQueue()
            new DiskBasedCache(new File(context.getCacheDir(), "volley")),
            new BasicNetwork(new HurlStack())) {
        @Override public <T> Request<T> add(Request<T> request) {
            request.setRetryPolicy(new DefaultRetryPolicy(60000, 1, 1));

            return super.add(request);
        }
    };
    queue.start();
    glide.register(GlideUrl.class, InputStream.class, new VolleyUrlLoader.Factory(queue));
}


}
about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!