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
MediaStore.Images.Media.insertImage(context.getContentResolver(),
filename.getAbsolutePath(), filename.getName(),
filename.getName());
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 !
My questions are:
- do i have to use the gallery app content provider, if yes how can i customize the folder source of thumbnails and images
- otherwise, how can i generate thumbnails (mini-kind, micro-kind as the gallery app does)