Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
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)
It requires androidx (#2020)
The first step is to add the dependencies in the
Now, if you want to execute Python in a Worker, we have the same issue to start Python from Java as Service.