I saw a solution here (http://www.rical.net/blog/ article-1318132709.html), not sure whether this is true as I didn't see this explanation elsewhere. What it means is that Media.insertImage() returns the Uri will be in "content://" format, but ACTION_MEDIA_SCANNER_SCAN_FILE intent required format in "file://". This explains why scan files/refresh does NOT work!
Here's the code below, what do you all think? -- Uri uri = Uri.parse(szUrl); String[] proj = { MediaStore.Images.Media.DATA }; Cursor actualimagecursor = managedQuery(uri,proj,null,null,null); int actual_image_column_index = actualimagecursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA); actualimagecursor.moveToFirst(); String img_path = actualimagecursor.getString(actual_image_column_index); uri = Uri.parse("file://" + img_path); // Send intent sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, uri)); -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en