File tree 1 file changed +10
-1
lines changed 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::
74
74
service.start(mActivity, argument)
75
75
76
76
Here, ``your.package.domain.package.name `` refers to the package identifier
77
- of your APK.
77
+ of your APK.
78
78
79
79
If you are using buildozer, the identifier is set by the ``package.name ``
80
80
and ``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
89
89
``argument `` parameter even if (as here) it is an empty string. If you
90
90
do pass it, the service can make use of this argument.
91
91
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
+
92
101
Services support a range of options and interactions not yet
93
102
documented here but all accessible via calling other methods of the
94
103
``service `` reference.
You can’t perform that action at this time.
0 commit comments