2017-08-13 02:24:00 +01:00
|
|
|
class ServiceApp(App):
|
|
|
|
def build(self):
|
2017-08-17 23:06:57 +01:00
|
|
|
from jnius import autoclass
|
2017-08-13 02:24:00 +01:00
|
|
|
|
2017-08-17 23:06:57 +01:00
|
|
|
Intent = autoclass('android.content.Intent')
|
|
|
|
LbrynetService = autoclass('io.lbry.lbrynet.LbrynetService')
|
|
|
|
#context = autoclass('org.kivy.android.PythonActivity').mActivity
|
2017-08-13 02:24:00 +01:00
|
|
|
|
2017-08-17 23:06:57 +01:00
|
|
|
#LbrynetService.start(context, '')
|
2017-08-13 02:24:00 +01:00
|
|
|
|
2017-08-17 23:06:57 +01:00
|
|
|
# close the activity once the service starts
|
|
|
|
# ideally, we should have some form of service control for the activity
|
|
|
|
#context.finish()
|
2017-08-13 02:24:00 +01:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
ServiceApp().run()
|