// Tell the media scanner about the new file so that it is
// immediately available to the user.
MediaScannerConnection.scanFile(
this
,
new
String[] { file.toString() },
null
,
new
MediaScannerConnection.OnScanCompletedListener() {
public
void
onScanCompleted(String path, Uri uri) {
Log.i(
"ExternalStorage"
,
"Scanned "
+ path +
":"
);
Log.i(
"ExternalStorage"
,
"-> uri="
+ uri);
}
});
时间: 2024-10-11 21:49:27