python-for-android icon indicating copy to clipboard operation
python-for-android copied to clipboard

Introduce `--extra-manifest-application-xml` option

Open Novfensec opened this issue 7 months ago • 0 comments

This is a feature request.

  • Add an option to directly write inside the <manifest><application> element of the AndroidManifest.xml.

Sample buidlozer.spec equivalent to the option in p4a:

# (str) Extra xml to write directly inside the <manifest><application> element of AndroidManifest.xml
# use that parameter to provide a filename from where to load your custom XML code:
# android.extra_manifest_application_xml = ./src/android/extra_manifest_application.xml

Sample src/android/extra_manifest_application.xml:

<activity
    android:name="org.myapp.android.MyActivity"
    android:process=":my_process"
    android:exported="true"
    android:configChanges="orientation|keyboardHidden"
    android:launchMode="singleTask" />

<receiver
    android:name="org.example.MyBroadcastReceiver"
    android:enabled="true"
    android:exported="false">
    <intent-filter>
        <action android:name="android.intent.action.BOOT_COMPLETED" />
    </intent-filter>
</receiver>

<service
    android:name="org.example.MyBackgroundService"
    android:enabled="true"
    android:exported="true" />

Novfensec avatar Jul 14 '25 02:07 Novfensec