07-26-2010 05:14 AM
When an app's running, if an alarm event occured, the app still runs behind.
In some apps, it's no problem but this is sometimes needed on the others.
I have tried to debug but cannot find how to resolve.
Can somebody help me?
07-26-2010 04:29 PM - edited 07-26-2010 04:31 PM
You can detect if another application/screen has appeared on top of your application by overriding the Screen.onObscured method. The Screen.onExposed method is fired when a screen returns to view (is on the top of the display stack).
This won't catch the alarm specifically, but is a generic option that works whenever another application appears on top of yours.
07-27-2010 03:26 PM
When a screen appears on top of your screen (by your application or another application) the onObscured method of your screen will be called. Once this screen is dismissed and your screen is once again on top, the onExposed method of your screen will be called.
Therefore you can override these two methods on your screen to detect when another application/screen appears on top of yours and pause and resume your application as required.