I'm running an alpha test on my mobile game and few users are having problems with losing their progress when they briefly go to messenger or Facebook or something other in their phone. When they come back to the game it will restart and go back to the menu. I think this only happens on phones that have turned on battery saving mode so they auto close to free up memory or something like that.
So my question is, how would I catch when users are going to another app. The trigger "on suspended" would be the best action I think, and when it catches that it would use the "Save Game" action. But the problem with that, would the Save Game action be able to finish saving everything when the user has already suspended the game?
Would I need to catch this before the user even clicks the minimize button by auto saving each 10 sec or so? Instead of using save game, should I make a custom function that writes it to the local storage instead, would that be faster?