fix(android): use provider prefix to avoid conflicts other plugin providers (#510)

Co-authored-by: jcesarmobile <jcesarmobile@gmail.com>
This commit is contained in:
Loïc Le Malliaud 2020-07-16 13:08:40 +02:00 committed by GitHub
parent fd155d9705
commit eb7fc333ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -59,7 +59,7 @@
<config-file target="AndroidManifest.xml" parent="application">
<provider
android:name="org.apache.cordova.camera.FileProvider"
android:authorities="${applicationId}.provider"
android:authorities="${applicationId}.cordova.plugin.camera.provider"
android:exported="false"
android:grantUriPermissions="true" >
<meta-data

View File

@ -294,7 +294,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
File photo = createCaptureFile(encodingType);
this.imageFilePath = photo.getAbsolutePath();
this.imageUri = FileProvider.getUriForFile(cordova.getActivity(),
applicationId + ".provider",
applicationId + ".cordova.plugin.camera.provider",
photo);
intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
//We can write to this URI, this will hopefully allow us to write files to get to the next step
@ -795,7 +795,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
try {
if (this.allowEdit) {
Uri tmpFile = FileProvider.getUriForFile(cordova.getActivity(),
applicationId + ".provider",
applicationId + ".cordova.plugin.camera.provider",
createCaptureFile(this.encodingType));
performCrop(tmpFile, destType, intent);
} else {