Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(android) fix: use provider prefix to avoid conflict with cordova-open plugin #510

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
breautek marked this conversation as resolved.
Show resolved Hide resolved
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