added app suspend and resume events
added support for app suspend and resume