Page 1 of 1
Exitting an App on Android from Recents list
Posted: Thu May 13, 2021 5:01 am
by davec
Hi all,
Is there a way to trigger an event when an app is closed/quit from the recent apps view in Android?
Thanks
Dave
Re: Exitting an App on Android from Recents list
Posted: Sat May 15, 2021 3:40 pm
by amyren
I am not sure on how android works internally, but wouldnt that kill your app. So that even if it triggered an event, the app would be closed and not able to detect it.
Re: Exitting an App on Android from Recents list
Posted: Sun May 16, 2021 6:04 pm
by davec
Probably.
I just wanted to send a disconnect signal to a server before exitting so the server knew that the client can be removed from a list.
Re: Exitting an App on Android from Recents list
Posted: Sun May 16, 2021 9:19 pm
by airsoftsoftwair
I'm afraid that's not possible and not planned either because, as amyren said, I don't think there would be enough time to handle anything. Android apps are rather weird anyway because they aren't really meant to be closed. What Hollywood allows you to do, e.g. calling
End() to kill your app, is against the Android styleguide as well
