title: save images to sdcard with thumbnails and pass it to a gridview without using the Gallery content provider?
body: <p>I am making an app which downloads images from the web and stores them in sdcard before displaying them in a grid view. After googling a long time, i saw that it s possible to use the built-in gallery app content provider, wich generates thumbnails while storing images</p>
  
  <pre><code>MediaStore.Images.Media.insertImage(context.getContentResolver(),
                  filename.getAbsolutePath(), filename.getName(),
                  filename.getName()); 
  </code></pre>
  
  <p>I tried to use it, but i found that images are duplicated in the "DCIM/" folder (for me) and create thumbnails inside the "DCIM/.thumbnails/". Besides that, when i open the gallery app, i see my downloaded images ! </p>
  
  <p>My questions are:<br>
      - do i have to use the gallery app content provider, if yes how can i customize the folder source of thumbnails and images<br>
      - otherwise, how can i generate thumbnails (mini-kind, micro-kind as the gallery app does)</p>