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.