[
https://issues.apache.org/jira/browse/CB-11023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15292064#comment-15292064
]
ASF GitHub Bot commented on CB-11023:
-------------------------------------
Github user ktop commented on the pull request:
https://github.com/apache/cordova-lib/pull/432#issuecomment-220440531
@riknoll Vladimir is correct, there is no mechanism for either yet.
I think warnings are good, but does that mean the plugins that get
installed first get first dibs to modifying xml elements? How do we go about
keeping track of whether or not an attribute/element was modified or not?
For the second question, that has actually crossed my mind a few times
while testing (how I couldn't modify the second activity tag or add children to
it). I'm not really sure the best way to handle it. I've thought about adding
an identifier attribute to the config-file tag, but that would limit
config-file to modify only one element.
```xml
<config-file target="AndroidManifest.xml" parent="/manifest/application"
identifierName="android:name" identifierValue="SecondActivity" mode="merge" >
<activity android:configChanges="orientation|keyboardHidden|screenSize"
/>
</config-file>
```
End goal would be to be able to modify both activity tags in the same
config-file tag, but that may be a stretch.
> plugin.xml should be able to add attribute to an existing element in
> AndroidManifest.xml
> ----------------------------------------------------------------------------------------
>
> Key: CB-11023
> URL: https://issues.apache.org/jira/browse/CB-11023
> 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
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]