- Home /
Close application from app list android event
How can I detect application (game) closed from application list in android?
OnApplicationQuit() works only when users close the application from exit button.
Well outside simply using Android or Unitys API, you can use a myriad of methods from C# .NET.
This one comes to $$anonymous$$d.
if (AppDomain.IsFinalizingForUnload())
{
// Shutting down
}
I'm sure a quick google search would provide at least 3 other ways.
I'm having the same problem. From in game, if I press Recent Apps button and immediately close the game, then neither OnApplicationPause nor OnApplicationQuit is triggered. But if I select another app and then close the game from Recent Applications, then it saves correctly.
Answer by ted537 · May 26, 2017 at 04:17 PM
I don't think you can listen to that event, but you can listen to both OnApplicationPause and OnApplicationQuit to cover all cases where the app exits
https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnApplicationPause.html https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnApplicationQuit.html
Your answer
![](https://koobas.hobune.stream/wayback/20220612122257im_/https://answers.unity.com/themes/thub/images/avi.jpg)