Python logging (#7)
Service code cleanup. Kivy dependency eliminated. File and stdout logging working properly.
This commit is contained in:
parent
f211b0df99
commit
80aeb406af
11 changed files with 195 additions and 100 deletions
src/main/python
|
@ -1,28 +1,16 @@
|
|||
from kivy.app import App
|
||||
from kivy.lang import Builder
|
||||
from kivy.utils import platform
|
||||
|
||||
kv = '''
|
||||
Button:
|
||||
text: 'push me!'
|
||||
'''
|
||||
|
||||
class ServiceApp(App):
|
||||
def build(self):
|
||||
if platform == 'android':
|
||||
from jnius import autoclass
|
||||
from jnius import autoclass
|
||||
|
||||
Intent = autoclass('android.content.Intent')
|
||||
LbrynetService = autoclass('io.lbry.lbrynet.LbrynetService')
|
||||
context = autoclass('org.kivy.android.PythonActivity').mActivity
|
||||
Intent = autoclass('android.content.Intent')
|
||||
LbrynetService = autoclass('io.lbry.lbrynet.LbrynetService')
|
||||
#context = autoclass('org.kivy.android.PythonActivity').mActivity
|
||||
|
||||
#LbrynetService.start(context, '')
|
||||
#LbrynetService.start(context, '')
|
||||
|
||||
# close the activity once the service starts
|
||||
# ideally, we should have some form of service control for the activity
|
||||
#context.finish()
|
||||
|
||||
return Builder.load_string(kv)
|
||||
# close the activity once the service starts
|
||||
# ideally, we should have some form of service control for the activity
|
||||
#context.finish()
|
||||
|
||||
if __name__ == '__main__':
|
||||
ServiceApp().run()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue