Commit 5a26fea0 authored by Philipp Auersperg's avatar Philipp Auersperg
parents 97cd1ffd aac6793c
# Kivy Service Example
Minimal Kivy Service example with a simple echo service
## install/build
$ buildozer android debug deploy
## logcat
# adb logcat|grep -e TestP3Serv -e python
## start app via adb
starting app via logcat works now
$ adb shell am start org.bd.p3service/org.kivy.android.PythonActivity
but still searching how to start it from an android app
resources in the net:
- (https://groups.google.com/forum/#!topic/kivy-users/a55E-xovkds)
- (https://stackoverflow.com/questions/46867907/starting-kivy-service-on-bootup-android)
- (https://stackoverflow.com/questions/47362161/kivy-service-stops-when-app-is-closed)
from kivy import platform
# from kivy import platform
import time
def start_service():
print ('starting service...')
if platform == 'android':
if True: #platform == 'android':
from jnius import autoclass
service = autoclass('org.bd.p3service.ServiceTestp3serv')
mActivity = autoclass('org.kivy.android.PythonActivity').mActivity
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment