私は phonegap を開発しており、Android のインテントを使用したいと考えています。以下を AndroidManifest.xml (platforms/android 内) に追加すると、期待どおりに動作します。
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="*mysite.com" />
<data android:host="*mysite.de" />
</intent-filter>
これを AndroidManifest.xml 経由ではなく、www/ の下の config.xml 経由で構成する方法を知りたいと思います。AndroidManifest.xml ファイルがビルド プロセス中に上書きされる可能性があり、config.xml が適切な場所であることを理解している限りです。このようなもののために。私は以下を試しました(あらゆる種類のバリエーションを含む):
<platform name="android">
<config-file target="AndroidManifest.xml" parent="/manifest/application/activity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="*mysite.de" />
<data android:host="*mysite.com" />
</intent-filter>
</config-file>
</platform>
...残念ながら、これは常に次のエラーになります。
[echo] ----------
[echo] Handling Resources...
[aapt] Found modified input file
[aapt] Generating resource IDs...
[aapt] /home/.../platforms/android/res/xml/config.xml:30: error: Error parsing XML: unbound prefix
どんなアイデアでも大歓迎です.1時間以上ウェブを検索しました.
私の phonegap のバージョンは 3.5.0-0.21.18 です