Maintain the activity of an application in the background

here is a test project for you, which does more or less what you were trying to do
after clicking button start you hear a voice saying "This is the beginning", the app will close and after 5 seconds the voice will say "This is the end"

jeff.aia (69.1 KB)

Taifun