I’m currently developing an app for the iPhone. If I want my app to continue running when the user hits the SLEEP button on the side of the phone, but to terminate the app (or exhibit a different behavior) when they hit the HOME button, how can I do that? Currently, it appears that both hitting the SLEEP and HOME button goes straight to the system.suspend event. Is there any way to distinguish the two?
This is for the iPhone.
Thank you!