4 ms·
I think you are reversing what the parent comment meant. You can continually write to the sandboxed filesystem of your app, say write the current timestamp ever
by lukevp 8y ago
I think you are reversing what the parent comment meant. You can continually write to the sandboxed filesystem of your app, say write the current timestamp every 10 seconds, and a status of if the app exited gracefully (which you can control). Then when restarting the app you check if there was a timestamp written in the last say 2 hours and no graceful exit then you know the app was terminated and can explain that the app didn't crash but that the OS vendor force quit it.
- dorfsmay 8y agoHow do you differentiate an apps crash from an OS forceful kill? Both would show a last good status and no good exit.
- ehnto 8y agoPresumably you would have an error log in the crash circumstance, unless it was very seriously broken.
- jessaustin 8y agoYou can detect which model of phone the app is running on, right? On these problematic models you should probably just assume that the app got killed in that circumstance.
- masklinn 8y agoYes, but that's not a detection or even an inference, it's a loose assumption.
- toast0 8y agoApp crash leaves a crash dump generally. Also, if your app crashes too often on some oems, the phone will automatically clear the local data, to "fix" it. I forget which one did it or I'd shame them directly.
- anderskaseorg 8y agoPlease don't! This will wear out both the battery and the flash memory for no reason. It's exactly this kind of sloppy coding that made these manufacturers decide app killers were necessary.