From ae1e59327fbdd333253fddae5f41cfade0dd6d87 Mon Sep 17 00:00:00 2001 From: cmp Date: Tue, 24 Jan 2023 09:51:56 -0600 Subject: In debug, fix crash that occurs when using the camera to post an image. (#1308) --- .../docilealligator/infinityforreddit/activities/PostImageActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostImageActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostImageActivity.java index 739d6a66..3c76b394 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostImageActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostImageActivity.java @@ -374,7 +374,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF captureFab.setOnClickListener(view -> { Intent pictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); try { - imageUri = FileProvider.getUriForFile(this, "ml.docilealligator.infinityforreddit.provider", + imageUri = FileProvider.getUriForFile(this, getPackageName() + ".provider", File.createTempFile("temp_img", ".jpg", getExternalFilesDir(Environment.DIRECTORY_PICTURES))); pictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri); startActivityForResult(pictureIntent, CAPTURE_IMAGE_REQUEST_CODE); -- cgit v1.2.3