From: "Vesselin Bontchev" <[EMAIL PROTECTED]>
> Every time the user launches an application (any application), I want my
application to be notified, so that it can do something about the
application that is being launched. How do I do this?
>
> I tried the following:
>
> void HandleNotification (SysNotifyParamType *np)
> {
>     switch (np->notifyType)
>     {
>         case sysNotifyAppLaunchingEvent:
(snip)
> UInt32 PilotMain (UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
> {
>     UInt16 cardNo;
>     LocalID dbID;
>
>     switch (cmd)
>     {
>         // :
>         // :
>         case sysAppLaunchCmdSystemReset:
>         case sysAppLaunchCmdSyncNotify:
>             SysCurAppDatabase (&cardNo, &dbID);
>             SysNotifyRegister (cardNo, dbID, sysNotifyAppLaunchingEvent,
NULL, sysNotifyNormalPriority, NULL);
>             break;
(snip)
> Where is the problem?
>
I did something very similar for a client app and it worked for me.
The only difference I could see was that I set up the notification
from a normal launch.  It might be worth testing to see if that works
before testing with Notify and Sync launches.

The other embarrasing mistake I've made is curse because the beeps
aren't sounding and then realising that the sound wasn't turned on in
the simulator  :-)  Start your app with a beep so that you can confirm
that the app is being launched to set the notification and that you can
hear the beeps.

Chris Tutty


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

Reply via email to