Hacker News new | past | comments | ask | show | jobs | submit login

If all you need is to detect it on the next boot to notify the user, as the prior comment said, then for example:

onCreate - check "running" flag, then set to true

onDestroy - set flag to "ended"

If onCreate saw the flag was already "running" before it was set, then you have a crash to recover from or a kill to notify the user about.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: