kivy - android app - background service that runs forever

1,217 views
Skip to first unread message

Salai V V

unread,
Jun 27, 2018, 11:25:18 AM6/27/18
to Kivy users support

I am complete newbie developing an android app in python using the kivy framework that requires a background service to run forever (uses GPS).


  • Using which python package can I do this? - python-for-android (or) PyJNIus (or) plyer
  • And, how am I supposed to do this, so that I don't consume much battery life and also make sure that android doesn't kill my service?
  • Do I need to register my service in some way with the host android OS during the first time install to make sure it runs even after reboots
  • And also, I am trying to implement the app using MVP. The model and the view is almost done, but I don't know how to bridge them (have no idea how the presenter works). I understand that the UI and the logic need their own threads. How can make them run in parallel and talk to each other in a way that is compatible with android?

ZenCODE

unread,
Jun 28, 2018, 2:46:11 AM6/28/18
to Kivy users support
You do do it this way: https://blog.kivy.org/2014/01/building-a-background-application-on-android-with-kivy/

That also shows how to do the comms. MVP is not required.

gll215

unread,
Jun 14, 2023, 11:33:39 PM6/14/23
to Kivy users support
Just wanted to resurrect this old thread... the guide provided is good, but OP was asking how to use GPS with the background service and get continuous position updates even when the screen is off, app has changed, etc.

Is there any example of how to use GPS a background service in this way?

Reply all
Reply to author
Forward
0 new messages