Feature Description:
Add support for a life cycle event callback: onOverwolfExit (or OnApplicationQuit) - notify the app that Overwolf / App is closing down (user closed the OW process, or an unexpected shut down)
impact for my app: [low, mid, high, show-stopper].
Mid impact
What is your current pain point?
While we collect match data, OW might shut down resulting in data not properly managed.
What do you have in mind to solve it?
Allow the app to register to an event that will be fired when OW is about to close down - allowing the app to respond.
As an example, Unity has this callback when app is closing down Unity - Scripting API: MonoBehaviour.OnApplicationQuit()
note for stuff: after FR is accepted, add a link to the internal ticket.
It’s not my request, but here are a couple of use cases that I can think of off the top of my head:
you’re sending data to your server indicating a user is in a game, relying on an event that tells you that the user exits the game at some point. User closes the app, event will never happen
You have temporary data in memory that you want to flush to a db or storage at some point, but not immediately. User exits app before a triggering event - data is lost
you want to track if user manually close the app after a game starts
you created temporary data that you want to cleanup
@Colorfulstan, I’m sorry we didn’t “close” this ticket with proper explanations, so I’m adding it now.
The FR was rejected because we thought that this feature would not be so useful. I’m adding some inline explanations.
you’re sending data to your server indicating a user is in a game, relying on an event that tells you that the user exits the game at some point. User closes the app; the event will never happen.
We cannot implement this for “an unexpected shutdown,” only if the user actually exists Overwolf via the tray menu while the app is still running. Maybe also if he tries to close the process via Task Manager.
You have temporary data in memory that you want to flush to a DB or storage at some point, but not immediately. User exits app before a triggering event - data is lost.
To be robust, we usually store data in the localStorage, so that if OW shuts down, we can pick up where we left on the next startup of the app.
you want to track if the user manually closes the app after a game starts
Not sure how this will solve this - if the user closes the app manually, you can track it. Otherwise, you’ll know that he closed Overwolf.
you created temporary data that you want to clean up
Well, if the temporary data is not stored anywhere, it will automatically clean up. If it is stored, you can clean it up upon the next start of the app.