From 89e84240e005db07f2552bbb4424825ee2eb7b72 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 23 Dec 2019 19:34:40 +0800 Subject: [PATCH] bugfix --- kivyblocks/serviceControl.py | 12 ++++++++++++ kivyblocks/vplayer.py | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 kivyblocks/serviceControl.py diff --git a/kivyblocks/serviceControl.py b/kivyblocks/serviceControl.py new file mode 100644 index 0000000..015c535 --- /dev/null +++ b/kivyblocks/serviceControl.py @@ -0,0 +1,12 @@ +from jnius import autoclass + +def startService(className): + # service = autoclass('your.service.name.ClassName') + service = autoclass(className) + mActivity = autoclass('org.kivy.android.PythonActivity').mActivity + service.start(mActivity) + +def stopService(className): + service = autoclass(className) + mActivity = autoclass('org.kivy.android.PythonActivity').mActivity + service.stop(mActivity) diff --git a/kivyblocks/vplayer.py b/kivyblocks/vplayer.py index 4052391..3a00565 100644 --- a/kivyblocks/vplayer.py +++ b/kivyblocks/vplayer.py @@ -32,7 +32,9 @@ class VPlayer(FloatLayout): stoped_play = BooleanProperty(False) paused_play = BooleanProperty(False) - def __init__(self,vfile=None,loop=False, + def __init__(self,vfile=None, + playlist=None, + loop=False, openfile_img=None, exit_img = None, pause_img = None,