Services in Android start to being agressively stopped with doze mode and Android 10. So if you want to execute something into the background, there is many solution, but the most state of the art is to use Worker/WorkManager . (another approach would be AlarmManager)
Now, if you want to execute Python in a Worker, we have the same issue to start Python from Java as Service.
The plan would be to create a PythonRunner java class with a native entrypoint implemented in C to start Python, then update our PythonService to use it, and we can also provide a PythonWorker as well that use it.
The text was updated successfully, but these errors were encountered:
Since Samsung on Android11 (and other vendors too) with ChimeraPolicyHandler is agressively killing even foreground services, we really need WokrManager support for kivy, for cyclic background operations. Is anyone willing to take this task?
I see the PR has not been updated for 9 months, is this still in progress? I am very interested in this to better handle long running tasks in our Android App. We currently have a pure Python task runner, and it would be useful to be able to swap in a WorkManager compatible interface instead.