Android Service help needed

16 views
Skip to first unread message

Max Bedacht

unread,
Aug 28, 2016, 4:40:15 PM8/28/16
to Kivy users support
My app uses a service to capture gps positioning data. (I used the kivy_service_osc example as a base).

The problem is that when the app is paused by Android the service seems to be stopped as well, thereby not capturing any more gps data. I would like to be able to start capturing and then put the phone down, possibly for long periods,  and then , when awakened, read the gps information from the service.

Is there any way I can get Android to keep the service active when the main app is paused - maybe even if the main app ends?

ZenCODE

unread,
Aug 29, 2016, 8:05:33 AM8/29/16
to Kivy users support
Services should keep running in these cases. Ours does (downloading content). Perhaps it's crashing? Maybe try a timed loop where you log the state of the service to pickup what is happening....

Max Bedacht

unread,
Aug 29, 2016, 11:39:29 AM8/29/16
to kivy-...@googlegroups.com
I managed to determine that the service kept running after a pause with logcat. Something seems to be stopping the service, sometimes, but not always. I'm going to try a few alternatives to see if I can isolate the condition that is stopping the service.

On Mon, Aug 29, 2016 at 9:05 AM ZenCODE <zenkey....@gmail.com> wrote:
Services should keep running in these cases. Ours does (downloading content). Perhaps it's crashing? Maybe try a timed loop where you log the state of the service to pickup what is happening....

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages