Skip to content

Commit

Permalink
fix(android): use provider prefix to avoid conflicts other plugin pro…
Browse files Browse the repository at this point in the history
…viders (#510)



Co-authored-by: jcesarmobile <jcesarmobile@gmail.com>
  • Loading branch information
LoicEvenium and jcesarmobile committed Jul 16, 2020
1 parent fd155d9 commit eb7fc33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -150,12 +150,12 @@
<js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
<clobbers target="CameraPopoverHandle" />
</js-module>

<header-file src="src/osx/CDVCamera.h" />
<source-file src="src/osx/CDVCamera.m" />

<framework src="Quartz.framework" />
<framework src="AppKit.framework" />
</platform>

</plugin>
4 changes: 2 additions & 2 deletions src/android/CameraLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public void takePicture(int returnType, int encodingType)
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
Expand Down Expand Up @@ -795,7 +795,7 @@ else if (srcType == CAMERA) {
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 {
Expand Down

0 comments on commit eb7fc33

Please sign in to comment.