@@ -68,15 +68,23 @@ code), you must use PyJNIus to interact with the java class
6868python-for-android creates for each one, as follows::
6969
7070 from jnius import autoclass
71- service = autoclass('your.package.name.ServiceMyservice')
71+ service = autoclass('your.package.domain.package. name.ServiceMyservice')
7272 mActivity = autoclass('org.kivy.android.PythonActivity').mActivity
7373 argument = ''
7474 service.start(mActivity, argument)
7575
76- Here, ``your.package.name `` refers to the package identifier of your
77- APK as set by the ``--package `` argument to python-for-android, and
78- the name of the service is ``ServiceMyservice ``, in which ``Myservice ``
79- is the identifier that was previously passed to the ``--service ``
76+ Here, ``your.package.domain.package.name `` refers to the package identifier
77+ of your APK.
78+
79+ If you are using buildozer, the identifier is set by the ``package.name ``
80+ and ``package.domain `` values in your buildozer.spec file.
81+ The name of the service is ``ServiceMyservice ``, where ``Myservice ``
82+ is the name specied by one of the ``services `` values, but with the first
83+ letter upper case.
84+
85+ If you are using python-for-android directly, the identifier is set by the ``--package ``
86+ argument to python-for-android. The name of the service is ``ServiceMyservice ``,
87+ where ``Myservice `` is the identifier that was previously passed to the ``--service ``
8088argument, but with the first letter upper case. You must also pass the
8189``argument `` parameter even if (as here) it is an empty string. If you
8290do pass it, the service can make use of this argument.
0 commit comments