You can't detect when your application is closed. There is only OnLuanched, OnSuspending and OnResumed events. When they close the application out, the intent is that the user wants the application to start fresh the next time it is launched.
You can start serializing all data changes to file, but this is overkill. The user closed the app, initialize it as normal.