apache / cordova-plugin-camera

Apache Cordova Plugin camera

Home Page:https://cordova.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cordova Android duplicated uses-permissions from two plugins

YanouonaY opened this issue · comments

Bug Report

Problem

I try to update the plugin cordova-plugin-camera 6.0.4 -> 7.0.0 with Android13 bug corrections. BUt i've got a probleme: Cordova Android duplicated uses-permissions from two plugins with permission "WRITE_EXTERNAL_STORAGE". In fact, this permission is add with another cordova plugin without maxSdkVersion like cordova-plugin-file v6.0.2 or cordova-plugin-x-social-sharing v6.0.4. This 2 last plugins add "WRITE_EXTERNAL_STORAGE" wihtout maxSdkVersion and the AndroidManifest result contains 2 same uses-permission:

- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <uses-permission android:maxSdkVersion="32" android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

What is expected to happen?

What does actually happen?

Information

Command or Code

Environment, Platform, Device

Version information

Checklist

  • [x ] I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • [ x] I included all the necessary information above

#854 (comment)

Closing as duplicated.

I would suggest filing a big ticket with the third-party plugin. Ask them to update the plugin for Android 13 and set the maxSdkVersion to 32 for those permissions.

In the mean time, you can look at the above link. It contains a gist link to code example that you can use in a hookscript to remove the duplicated permissions.