Our android app saves state before it is killed via (Activity::OnSaveInstanceState). The works well if the app is back grounded before being killed. (which one has to do before explicitly closing an app android) However on ChromeOS, android apps can be killed without back grounding them.
Apps have an 'x' in the top right corner, which closes the app without back grounding it.
If the app is ended this way, OnSaveInstanceState doesn't appear to run (or perhaps it doesn't have enough time to finish?), and so the app state isn't saved.
Q: Is there away to either:
- Disable/hide this 'x' for the android app?
- Save state even if the app is ended this way.
Note: android apps on chrome also have 'back arrow' (not shown in this screen shot - top left on the toolbar), which closes the app. State is saved as expected, when app is closed that way.