cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John VanHorn (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-8401) Android permissions don't merge nicely when maxSdkVersion is set
Date Mon, 04 Jan 2016 17:40:40 GMT

    [ https://issues.apache.org/jira/browse/CB-8401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15081437#comment-15081437
] 

John VanHorn commented on CB-8401:
----------------------------------

This is not specific to maxSdkVersion. 2 plugins with the following in their plugin.xml...

{code:xml|title=plugin 1}
<uses-feature android:name="android.hardware.camera.autofocus" />
{code}

{code:xml|title=plugin 2}
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"
/>
{code}

...causes build to fail with the same "duplicated element" error.


> Android permissions don't merge nicely when maxSdkVersion is set
> ----------------------------------------------------------------
>
>                 Key: CB-8401
>                 URL: https://issues.apache.org/jira/browse/CB-8401
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugman
>         Environment: Android
>            Reporter: Eddy Verbruggen
>
> If two plugins request the same permission they are nicely merged into one line in AndroidManifest.xml.
> However, if one of those two has 'android:maxSdkVersion="18"', both lines show up in
the resulting AndroidManifest.xml which is not allowed, so the Android build fails.
> As an example you can create a Cordova CLI project with the core File plugin and SocialSharing
(the latter has the maxSdkVersion set):
> cordova create duplicatepermissiontest
> cd duplicatepermissiontest
> cordova platform add android
> cordova plugin add org.apache.cordova.file
> cordova plugin add nl.x-services.plugins.socialsharing
> cordova prepare
> The AndroidManifest.xml now has the duplicate permission.
> I think what you'd want is the broader permission to 'win' this fight, so I'd expect
the manifest to contain only '<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>'.
> Note that I added the maxSdkVersion restriction because according to Google SDK 19+ no
longer requires the permission in my case and the permission tends to scare off people using
apps with this plugin installed.
> I hope you will consider creating something clever to merge these duplicate permissions.
> This issue was first reported here: https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/issues/295
> Best,
> Eddy



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message