Running a Service that does some work in the Foreground

202 views
Skip to first unread message

Adrian Flores

unread,
Apr 25, 2023, 7:16:24 PM4/25/23
to Kivy users support
I've been struggling to get an application to run a service in the foreground for hours. I'm trying to create an application and I want some work to be done in the background on the phone so that even if the app is killed the work will still be done. I haven't been able to find any simple examples that work, I would appreciate some help -- even something as simple as a timer printing to logcat so that I can see that after killing the app, the program is still printing to logcat. Is this possible? I would like to use python, kivy and pyjnius (for an android application) to accomplish this if possible. Thanks in advance, I appreciate any tips! 

Aakash Aarya

unread,
Apr 25, 2023, 7:25:53 PM4/25/23
to kivy-...@googlegroups.com
For this you have to use Java API. Create a java class and add it to the builddozer.spec file and call it from the python main.py. hope its work . Try once

On Wed, Apr 26, 2023, 4:46 AM Adrian Flores <adriqnf...@gmail.com> wrote:
I've been struggling to get an application to run a service in the foreground for hours. I'm trying to create an application and I want some work to be done in the background on the phone so that even if the app is killed the work will still be done. I haven't been able to find any simple examples that work, I would appreciate some help -- even something as simple as a timer printing to logcat so that I can see that after killing the app, the program is still printing to logcat. Is this possible? I would like to use python, kivy and pyjnius (for an android application) to accomplish this if possible. Thanks in advance, I appreciate any tips! 

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/6553c73e-88b8-4cbe-83d5-674a6bfc853fn%40googlegroups.com.

Robert

unread,
Apr 25, 2023, 8:35:59 PM4/25/23
to Kivy users support

Robert

unread,
Apr 25, 2023, 9:01:43 PM4/25/23
to Kivy users support
To:  aarya...#gmail.com


> For this you have to use Java API. Create a java class and add it to the builddozer.spec file and call it from the python main.py. hope its work

Please stop spamming this group with answers that are unreliable. Presumably from ChatGPT.
Reply all
Reply to author
Forward
0 new messages