Ben, from his previous posting I didn't think he wanted to run to apps.

I thought he wanted to launch to another app based on the data of the
incoming phone number as do I.

I had previously posted the below msg, but haven't had a response yet.

Your thoughts? Thanks, Bruce.

I have a CRM application that I want to launch to the customer rec on an
incoming phone call on the Treo 650. I have registered for the phone event
and can extract the phone number. I then set the memory owner to system and
do a SysUIAppswitch to my app with a special command and the memory pointer
to do a lookup and display the CRM data. 

The basic code is:
else if ( cmd == phnLibLaunchCmdEvent )
{
char    *number = NULL, *myNum;
PhnEventPtr phoneEvent;
        
phoneEvent = (PhnEventPtr)cmdPBP;
if (phoneEvent->eventType == phnEvtSubscriber) {
        number = MemHandleLock((MemHandle)(phoneEvent->data.info.caller));
                        
        myNum = MemPtrNew(48);
        MemSet(myNum, 48, NULL);
                        
        StrPrintF(myNum, "%s", (char *)(number)+14);
                
        MemHandleUnlock((MemHandle)(phoneEvent->data.info.caller));
                        
        error = MemPtrSetOwner(myNum, 0);
        SysUIAppSwitch(0, localID, dDialDisplayCmd, myNum);

        phoneEvent->acknowledge = false;
}


It never switches on the actual treo 650 device. If I debug on the treo 650
with CW 9.3 via USB it always switches to the CRM data. I suspect there is a
timing issue around the phone app but am uncertain as what to do. I would
appreciate suggestions and or info on what is taking place internally during
an incoming phone call. Thanks, Bruce.



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ben Combee
Sent: Tuesday, November 01, 2005 8:11 PM
To: Palm Developer Forum
Subject: Re: Phone app in background

At 06:43 PM 11/1/2005, you wrote:
>But when I am answering a call I can open others applications, like phone 
>book, calculator and so on . . and I continuous on call . . .
>I am using the Treo 650 . .

True, but the phone integration is done at the system library level, not at 
the application level.  Also, most of the mechanics of handling the phone 
call are handled by a separate phone module that doesn't rely on the main 
ARM CPU that runs Palm OS.  When you switch to other programs, the phone 
app stops running, but the core library remains active, talking with the 
phone module to handle any status changes.


-- Ben Combee, Senior Software Engineer, Palm, Inc.
    "Combee on Palm OS" weblog: http://palmos.combee.net/
    Developer Forum Archives:   http://news.palmos.com/read/all_forums/


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



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

Reply via email to