title: Android Glide: How to download and cache bitmaps?
body: <p>I am using Glide to download and cache images on Android. Everything works well except the fact that I don't want to load the bitmaps directly into the <code>ImageView</code>, I don't want to have the fade animation, neither image placeholders.</p>
  
  <p>All I want is to create a global method which will help me to download the image all over the application.</p>
  
  <pre><code>public class MyApp extends Application {
  
     public static void downloadImage(String url, final OnImageLoadedCallback callback) {
  
       // And how to implement the listener ?
  
       RequestListener&lt;String, Bitmap&gt; requestListener = new RequestListener&lt;String, Bitmap() {
          @Override
          public boolean onException(Exception exc, String string, Target&lt;Bitmap&gt; target, boolean isFirstResource) {
  
             callback.onDone(null);               
  
             return false;
          }
  
          @Override
          public boolean onResourceReady(Bitmap bitmap, String string, Target&lt;Bitmap&gt; target, boolean isFromMemoryCache, boolean isFirstResource) {
  
              callback.onDone(bitmap);
  
              return false;
          }
       };
  
        Glide.with(context)
             .load(url)
             .asBitmap()
             .dontAnimate()
             .diskCacheStrategy(DiskCacheStrategy.SOURCE)
             .listener(requestListener);
     }
  
  }
  </code></pre>
  
  <p>The problem is that I don't know how to implement the listener. <code>RequestListener</code> isn't called at all.</p>