Exit Event or something notifying when App closes

Is there any Event or any way that I could capture when the App is closing or exiting? I see there is an App_Launched Event, I was hoping to find something similar on Exit so I could save and write out user data, such as log-out time or whatever. Just wondering if this might be possible with Advanced Custom Event if anyone can help.



On app level there isn’t such an event. but you could use the “page will unmount” event for a similar effect, as it will run right before the app closes.

So this would occur on the initial page i assume?


As far as I remember, it should fire from any pages, as they will all unmount.

Right but if the First Initial page unmounts then wouldnt that be the app exiting? Or does a page unmount any time you just navigate away from it? Im just trying to clarify what situation occurs that causes Unmount to occur
And whether its possible that the initial page unmount but other pages still remain mounted.?


Ah, I see what you mean! The “will unmount” should only occur when the app exits, and it will then occur for all pages. However I wouldn’t trust the pages to unmount in any specific order.

1 Like

Thank you, that is what I needed to know. And very good to know!