Simple Notepad Application for Android OS
Revision | 3f5202eec576b8f9e106aaacc33c7b4ba510a78d (tree) |
---|---|
Time | 2014-07-09 17:57:32 |
Author | Masahiko, SAWAI <say@user...> |
Commiter | Masahiko, SAWAI |
Added media scan support for database backup file
@@ -24,6 +24,7 @@ | ||
24 | 24 | package org.routine_work.notepad.prefs; |
25 | 25 | |
26 | 26 | import android.app.Activity; |
27 | +import android.media.MediaScannerConnection; | |
27 | 28 | import android.os.Bundle; |
28 | 29 | import android.os.Environment; |
29 | 30 | import android.text.format.DateFormat; |
@@ -107,6 +108,11 @@ public class BackupDatabaseActivity extends Activity | ||
107 | 108 | inputChannel.transferTo(0, inputChannel.size(), outputChannel); |
108 | 109 | inputChannel.close(); |
109 | 110 | outputChannel.close(); |
111 | + | |
112 | + MediaScannerConnection.scanFile(this, new String[] | |
113 | + { | |
114 | + backupFilePath.getAbsolutePath() | |
115 | + }, null, null); | |
110 | 116 | } |
111 | 117 | catch (IOException ex) |
112 | 118 | { |