File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ python-for-android creates for each one, as follows::
7474 service.start(mActivity, argument)
7575
7676Here, ``your.package.domain.package.name `` refers to the package identifier
77- of your APK.
77+ of your APK.
7878
7979If you are using buildozer, the identifier is set by the ``package.name ``
8080and ``package.domain `` values in your buildozer.spec file.
@@ -89,6 +89,15 @@ argument, but with the first letter upper case. You must also pass the
8989``argument `` parameter even if (as here) it is an empty string. If you
9090do pass it, the service can make use of this argument.
9191
92+ The service argument is made available to your service via the
93+ 'PYTHON_SERVICE_ARGUMENT' environment variable. It is exposed as a simple
94+ string, so if you want to pass in multiple values, we would recommend using
95+ the json module to encode and decode mode complex data.
96+ ::
97+
98+ from os import environ
99+ argument = environ.get('PYTHON_SERVICE_ARGUMENT', '')
100+
92101Services support a range of options and interactions not yet
93102documented here but all accessible via calling other methods of the
94103``service `` reference.
You can’t perform that action at this time.
0 commit comments