Skip to content

Commit deb259d

Browse files
committed
service.rsr auto-start section
1 parent f5f6e7c commit deb259d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

doc/source/services.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,20 @@ The call to this method should be done within the service code::
130130
from jnius import autoclass
131131
PythonService = autoclass('org.kivy.android.PythonService')
132132
PythonService.mService.setAutoRestartService(True)
133+
134+
Service auto-start
135+
~~~~~~~~~~~~~~~~~~~~
136+
137+
For auto-start service on boot need add inside out AndroidManifest.xml this code::
138+
139+
<receiver android:name=".MyBroadcastReceiver" android:enabled="true" android:exported="true">
140+
<intent-filter>
141+
<action android:name="android.intent.action.BOOT_COMPLETED" />
142+
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
143+
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON" />
144+
</intent-filter>
145+
</receiver>
146+
147+
You can do it use section ``android.extra_manifest_application_xml`` in ``buildozer.spec`` code::
148+
149+
android.extra_manifest_application_xml = %(source.dir)s/xml/receivers.xml

0 commit comments

Comments
 (0)