> Does anyone know, how I may detect in my application, if there is an
> application runnning at the time (i.e. or I am in the "Launcher" screen
with
> all the application icons) ?

For your own apps, you can create a feature in AppStart and remove it in
AppStop. Then you can determine whether your app is running by checking
whether the feature exists.

SysCurAppDatabase can be of some use. If app A is in the middle of a normal
or goto launch and app B is in the middle of some other sublaunch, the
result of this API will be app B's database, not app A's.

> Since I am doing this check as part of my processing following a
> sysAppLaunchCmdNotify which was notified from a WakeUpHandler(), would
this
> affect the result ?

Serial wakeup handlers must be coded using only interrupt-safe APIs. I'm not
sure if broadcasting a notification is legal. In any case, the actual
broadcast will probably be delayed until the next EvtGetEvent call. Apps
don't have to use only interrupt-safe APIs in their syncNotify handlers (or
any other launch codes, for that matter). They can assume they're running in
the UI thread (with the possible exception of reset notification, where the
system is "on the way up" and so may not be fully functional yet).

In any case, the result of SysCurAppDatabase during a syncNotify sublaunch
will be the sublaunched app's database, not the "current UI app".
--
Danny @ PalmSource 

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to