Updated An example of background Twisted server running on Android (markdown)

Veselin Penev 2019-09-30 10:21:26 +02:00
parent 714d03e9c1
commit 360d88e7a4
1 changed files with 5 additions and 1 deletions

@ -7,7 +7,11 @@ install_twisted_reactor()
But if you do not need Kivy UI in your "background" Twisted server you can just directly run `ractor.run()` and be happy.
But there is another issue. Seems like the latest changes in Android requires Android services to also populate some notification to user. This is how you can run "foreground" service that will run "Hello, world!" Twisted server on your Android device non-stop:
First I tried to use sample code from that wiki to do this: https://github.com/kivy/kivy/wiki/Background-Service-using-P4A-android.service
But there is another issue. Seems like the latest changes in Android requires Android services to also populate some notification to user. You need to create "Notification Channel" and then Android will accept your code.
This is how you can run "foreground" service that will run "Hello, world!" Twisted server on your Android device non-stop:
```python