Run function in background on android

100 views
Skip to first unread message

husamal...@gmail.com

unread,
Oct 6, 2021, 6:10:15 PM10/6/21
to Kivy users support
I want to just a method using kivy app on android after pressing a button and pass some argument to this function and ability to test if it is running or not also ability to stop it and finally I want the function to continue running even when the app is closing and only being stop inside the app this my first time doing this sorry if it silly 
I want just hints

thanks in advance 

Robert

unread,
Oct 6, 2021, 6:49:39 PM10/6/21
to Kivy users support
I'll skip the stuff about pressing a button, is boring basic stuff you can find anywhere.
The "continue running" requirement is less typical.......

Sounds like you want an Android Service (the link references two examples).
And most people quickly find out that they want a Foreground Service.

To understand the lifetime of a service you need to know that Kivy apps don't "close" they either "pause" or "stop"
On Android when an app is removed from the UI it usually goes to a "pause" state, until the OS or the user moves it to a "stop" state.
Reply all
Reply to author
Forward
0 new messages