Creo un plug-in per Cordova e voglio modificare AndroidManifest per aggiungere un attributo nel tag "application". Conosco config-file per aggiungere un nuovo tag ma non trovo se riesco ad aggiornare un tag esistente.Aggiungere un attributo al tag "application" in AndroidManifest da un plug-in cordova
Per esempio, ho questo AndroidManifest:
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="com.test.testCordova" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="CordovaApp" android:theme="@android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="@string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
</manifest>
e voglio aggiungere android:isGame=true
nel tag <application>
.
Se non riesco a farlo dal plugin.xml, creerò un hook per modificare l'AndroidManifest da solo, ma spero che non sia necessario.
Nel mio caso, utilizzo l'hook "before_compile" per aggiornare il manifest. – Shimrra