cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-11023) plugin.xml should be able to add attribute to an existing element in AndroidManifest.xml
Date Fri, 20 May 2016 16:06:12 GMT


ASF GitHub Bot commented on CB-11023:

Github user ktop commented on the pull request:
    I'd like to clear up some confusion I have on adding attributes. 
    Before, we had decided on going with this syntax where the child elements of config-file
tag would point to the child tags of the parent we want to add attributes to, so that we could
add attributes to more than one child in a single config-file tag.
    With the following syntax, I wouldn't be able to at add to the second activity. 
    <config-file target="AndroidManifest.xml" parent="/manifest/application" mode="merge"
        <activity android:enabled="true" />
    Now with your suggestion, the tag would look like this:
    Here, I would be able to specify the second activity, but this contradicts with what we
had before since activity tag isn't a child of the parent. 
    <config-file target="AndroidManifest.xml" parent="/manifest/application/activity[@android:name='SecondActivity']"
mode="merge" >
        <activity android:enabled="true" />
    Would we lose the ability to add attributes to more than one child? Or should we try to
do both? Detect that we want to add to the tag that is the same as the parent as well as child
tags. (Not sure if this makes sense)
    <config-file target="AndroidManifest.xml" parent="/manifest/application/activity[@android:name='SecondActivity']"
mode="merge" >
        <activity android:enabled="true" />
        <intent-filter android:priority="1" />
    Or any other ideas?

> plugin.xml should be able to add attribute to an existing element in AndroidManifest.xml
> ----------------------------------------------------------------------------------------
>                 Key: CB-11023
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: CLI, Plugman
>            Reporter: Carlos Santana
> We have a need for a plugin we develop to add the attribute android:name to the <application>
element to be able to point to a Class that tracks app sessions for analytics.
> plugin.xml only support via <config-file> only to add elements to AndroidManfist.xml
this request is to add an enhancement to also handle adding an attribute to an existing element.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message