You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/06/17 16:31:52 UTC

[GitHub] [cordova-plugin-camera] breautek commented on a change in pull request #510: (android) fix: use provider prefix to avoid conflict with cordova-open plugin

breautek commented on a change in pull request #510:
URL: https://github.com/apache/cordova-plugin-camera/pull/510#discussion_r441673391



##########
File path: plugin.xml
##########
@@ -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}.camera.provider"

Review comment:
       If these can conflict with other plugins I think I'd prefer to stay away from generic terms such as `camera`, otherwise I feel like there is still a decent risk of running into this kind of problem in the future.
   
   Therefore I think something like `"${applicationId}.cordova.plugin.camera.provider"` will be better, as it provides a pretty specific context.
   
   ```suggestion
                 android:authorities="${applicationId}.cordova.plugin.camera.provider"
   ```

##########
File path: src/android/CameraLauncher.java
##########
@@ -799,7 +799,7 @@ else if (srcType == CAMERA) {
                 try {
                     if (this.allowEdit) {
                         Uri tmpFile = FileProvider.getUriForFile(cordova.getActivity(),
-                                applicationId + ".provider",
+                                applicationId + ".camera.provider",

Review comment:
       same as above
   
   ```suggestion
                                   applicationId + ".cordova.plugin.camera.provider",
   ```

##########
File path: src/android/CameraLauncher.java
##########
@@ -301,7 +301,7 @@ public void takePicture(int returnType, int encodingType)
         // Specify file so that large image is captured and returned
         File photo = createCaptureFile(encodingType);
         this.imageUri = new CordovaUri(FileProvider.getUriForFile(cordova.getActivity(),
-                applicationId + ".provider",
+                applicationId + ".camera.provider",

Review comment:
       Same as above
   
   ```suggestion
                   applicationId + ".cordova.plugin.camera.provider",
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org