Skip to content

Commit cb7dbed

Browse files
authored
fix exporting monitoring (#33)
Use file provider for providing Uri for the export file.
1 parent a1120b0 commit cb7dbed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/org/bspb/smartbirds/pro/service/ExportService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.app.IntentService;
44
import android.content.Intent;
55
import android.net.Uri;
6+
import android.support.v4.content.FileProvider;
67
import android.util.Log;
78

89
import org.androidannotations.annotations.Bean;
@@ -84,6 +85,7 @@ public void prepareForExport() {
8485
return;
8586
}
8687

87-
eventBus.post(new ExportPreparedEvent(Uri.fromFile(exportFile)));
88+
Uri uri = FileProvider.getUriForFile(getApplicationContext(), SmartBirdsApplication.FILES_AUTHORITY, exportFile);
89+
eventBus.post(new ExportPreparedEvent(uri));
8890
}
8991
}

0 commit comments

Comments
 (0)