Save the images, which will be shared, to temp dir
This commit is contained in:
1 parent
56b42c67d5
commit
7df7defa92
3 files changed
+7
-6
No files matched your search
@@ -146,6 +146,9 @@ public class EhApplication extends RecordingApplication implements Thread.Uncaug
|
||||
if (null != dir) {
|
||||
FileUtils.deleteContent(dir);
|
||||
}
|
||||
|
||||
// Add .nomedia to external temp dir
|
||||
CommonOperations.ensureNoMediaFile(UniFile.fromFile(AppConfig.getExternalTempDir()));
|
||||
}
|
||||
|
||||
private void update() {
|
||||
|
||||
@@ -846,7 +846,7 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan
|
||||
return;
|
||||
}
|
||||
|
||||
File dir = AppConfig.getExternalImageDir();
|
||||
File dir = AppConfig.getExternalTempDir();
|
||||
if (null == dir) {
|
||||
Toast.makeText(this, R.string.error_cant_create_temp_file, Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
@@ -871,17 +871,15 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan
|
||||
Uri uri = new Uri.Builder()
|
||||
.scheme(ContentResolver.SCHEME_CONTENT)
|
||||
.authority(BuildConfig.FILE_PROVIDER_AUTHORITY)
|
||||
.appendPath("image")
|
||||
.appendPath("temp")
|
||||
.appendPath(filename)
|
||||
.build();
|
||||
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(Intent.ACTION_SEND);
|
||||
intent.putExtra(Intent.EXTRA_STREAM, uri);
|
||||
intent.setType(mimeType);
|
||||
startActivity(Intent.createChooser(intent, getString(R.string.share_image)));
|
||||
|
||||
// Sync media store
|
||||
sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, file.getUri()));
|
||||
}
|
||||
|
||||
private void saveImage(int page) {
|
||||
|
||||
Reference in new issue
Block a user