Rescanning sdcard manually

All your problems with Audio, Video and Images.

Rescanning sdcard manually

Postby rkarthik » Mon Sep 07, 2009 7:23 pm

Hi Guys,

I have two queries,

1.Is there a way to resccan the sdcard file programatically?

2.Im trying to open an image edit it and save it back.

And im using the below code,

mScanner = new MediaScannerConnection(this, new
MediaScannerConnection.MediaScannerConnectionClient() {
public void onMediaScannerConnected() { mScanner.scanFile
(fileName, null /* mimeType */);


public void onScanCompleted(String path, Uri uri) {
if (path.equals(fileName.toString())) {



I do get the Uri from onScanCompleted, but the thumbnail is not
updated in the gallery.

Also how do i make the MediaScanner to rescan all the image files or
all video or all music files
Junior Developer
Junior Developer
Posts: 17
Joined: Wed Jan 14, 2009 11:40 am


Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 1 guest