During import, add photo markers to gallery

This commit is contained in:
Jimmy Shih
2013-12-02 10:59:48 -08:00
parent d0a9885a50
commit 93ddc27566
3 changed files with 16 additions and 5 deletions
@@ -15,6 +15,9 @@
*/
package com.google.android.apps.mytracks.util;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Environment;
import java.io.File;
@@ -173,6 +176,12 @@ public class FileUtils {
}
return fileName.substring(index + 1);
}
public static void updateMediaScanner(Context context, Uri uri) {
Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
mediaScanIntent.setData(uri);
context.sendBroadcast(mediaScanIntent);
}
/**
* Builds a filename with the given base and the given extension, possibly