From b8a79f75636e598ccd2bf5d60a9677eefc094805 Mon Sep 17 00:00:00 2001 From: Emanuel Moecklin Date: Wed, 6 Oct 2021 21:44:18 -0400 Subject: [PATCH] Fix installation error caused by incorrect FileProvider in manifest #160 --- README.md | 13 ++++++------- RTEditor-Demo/src/main/AndroidManifest.xml | 13 +++++++------ RTEditor/src/main/AndroidManifest.xml | 11 ++++++++--- .../rteditor/media/choose/ImageChooserManager.java | 2 +- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 469bab2..0a91a26 100644 --- a/README.md +++ b/README.md @@ -46,19 +46,18 @@ Setup Add this to your Gradle build file: ``` dependencies { - compile 'com.1gravity:android-rteditor:1.6.7' + compile 'com.1gravity:android-rteditor:1.7.0' } ``` #### Manifest -Add these two Activity definitions to your manifest: +Add this to your manifest: ``` - - - + ``` #### Proguard diff --git a/RTEditor-Demo/src/main/AndroidManifest.xml b/RTEditor-Demo/src/main/AndroidManifest.xml index d5557e7..950d151 100644 --- a/RTEditor-Demo/src/main/AndroidManifest.xml +++ b/RTEditor-Demo/src/main/AndroidManifest.xml @@ -16,6 +16,7 @@ --> - + - - - + diff --git a/RTEditor/src/main/AndroidManifest.xml b/RTEditor/src/main/AndroidManifest.xml index 14bd492..81be13c 100644 --- a/RTEditor/src/main/AndroidManifest.xml +++ b/RTEditor/src/main/AndroidManifest.xml @@ -20,15 +20,20 @@ android:versionName="1.0"> + + + + - diff --git a/RTEditor/src/main/java/com/onegravity/rteditor/media/choose/ImageChooserManager.java b/RTEditor/src/main/java/com/onegravity/rteditor/media/choose/ImageChooserManager.java index d6959f7..559e383 100644 --- a/RTEditor/src/main/java/com/onegravity/rteditor/media/choose/ImageChooserManager.java +++ b/RTEditor/src/main/java/com/onegravity/rteditor/media/choose/ImageChooserManager.java @@ -100,7 +100,7 @@ private boolean takePicture() { // There are compatibility issues with FileProvider Uris on lower versions uriForCamera = Uri.fromFile(imageFile); } else { - uriForCamera = FileProvider.getUriForFile(mActivity, "com.onegravity.rteditor.fileprovider", imageFile); + uriForCamera = FileProvider.getUriForFile(mActivity, mActivity.getPackageName() + ".provider", imageFile); } Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE) .putExtra(MediaStore.EXTRA_OUTPUT, uriForCamera);