I\'ve created a file in the SD card using the code below:
File outputFile = new File( Environment.getExternalStorageDirectory().getAbsolutePath() + File.separato
image files need to be explicitly indexed in order to appear in the gallery. I suppose other applications may be using the same mechanism to get the thumbnail. Here is some code that will scan a new media file, right after you wrote it:
Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
Uri uri = Uri.fromFile(outputFile);
intent.setData(uri);
sendBroadcast(intent);