There are dialer helpers, which are services that listen for notifications
and respond, as necessary.

You can check for available helpers by broadcasting what amounts to an
inquiry notification. If there is a helper out there that supports the
service you are looking for, it will respond in the notification body.

Here's some code that demonstrates looking for and calling the dialer
helper:


// Validate a helper by class and id (go looking for it)
Boolean ValidateHelper(UInt32 serviceClassID, UInt32 helperAppID)
        {
        SysNotifyParamType notifyParam;
        HelperNotifyEventType helperEvent;
        HelperNotifyValidateType helperValidate;

        MemSet(&notifyParam,sizeof(notifyParam),0);
        notifyParam.broadcaster = YOUR_CREATOR_ID;
        notifyParam.notifyType = sysNotifyHelperEvent;
        notifyParam.notifyDetailsP = &helperEvent;

        MemSet(&helperEvent,sizeof(helperEvent),0);
        helperEvent.version = kHelperNotifyCurrentVersion;
        helperEvent.actionCode = kHelperNotifyActionCodeValidate;
        helperEvent.data.validateP = &helperValidate;

        MemSet(&helperValidate,sizeof(helperValidate),0);
        helperValidate.serviceClassID = serviceClassID;
        helperValidate.helperAppID = helperAppID;

        SysNotifyBroadcast(&notifyParam);
        return notifyParam.handled;
        }


// Validate the dialer helper
Boolean ValidateDialerHelper(void)
        {

        return ValidateHelper(kHelperServiceClassIDVoiceDial,0);
        }


// Place a voice call using the helper
Boolean DialerHelper(char *pPhoneNumber, char *pDisplayName)
        {
        SysNotifyParamType notifyParam;
        HelperNotifyEventType helperEvent;
        HelperNotifyExecuteType helperExecute;
         
        MemSet(&notifyParam,sizeof(notifyParam),0);
        notifyParam.notifyType = sysNotifyHelperEvent;
        notifyParam.broadcaster = YOUR_CREATOR_ID;
        notifyParam.notifyDetailsP = &helperEvent;

        MemSet(&helperEvent,sizeof(helperEvent),0);
        helperEvent.version = kHelperNotifyCurrentVersion;
        helperEvent.actionCode = kHelperNotifyActionCodeExecute;
        helperEvent.data.executeP = &helperExecute;

        MemSet(&helperExecute,sizeof(helperExecute),0);
        helperExecute.serviceClassID = kHelperServiceClassIDVoiceDial;
        helperExecute.dataP = pPhoneNumber;
        helperExecute.displayedName = pDisplayName;

        SysNotifyBroadcast(&notifyParam);

        return notifyParam.handled && helperExecute.err == errNone;
        }


--------------------
Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Mobile 253-691-8812 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
 

-----Original Message-----
From: Fernando Rodriguez Sela [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 8:30 AM
To: Palm Developer Forum
Subject: Problems making a call with Treo600

Hi,

I'm trying to launch a speech call from my application. I didn't find 
any special function to do this, so I decided to launch the Phone app.

When I call the next function the Treo makes a soft reset ! and I don't 
find the problem :(

void MakeCall(char *phone_number)
{
    Err err;

    UInt16 cardNo;
    LocalID dbID;
   
    Boolean newSearch;
    DmSearchStateType stateInfo;
    UInt32 type;
    UInt32 creator;
    Boolean onlyLatestVers;

    char *AppName = "Phone";
   
    UInt32 launchCode;
    PhoneAppLaunchCmdDialType launchData;

    newSearch = true;
    type = ApplicationType;
    creator = hsFileCPhone;
    onlyLatestVers = true;
    err = 
DmGetNextDatabaseByTypeCreator(newSearch,&stateInfo,type,creator,onlyLatestV
ers,&cardNo,&dbID);
    if(err) return;

    launchCode = phoneAppLaunchCmdDial;
   
    launchData.version = 1;
    launchData.confirm = false;
    launchData.name = "";
    launchData.number = phone_number;
    launchData.extraDigits = "";
    launchData.failLaunchCreator = appFileCreator;
    launchData.failLaunchCode = sysAppLaunchCmdNormalLaunch;
    launchData.failLaunchParams = "";
    launchData.dialMethod = PhoneAppDialMethodNormal;
   
    err = SysUIAppSwitch(cardNo, dbID, launchCode, &launchData);
}

I need some help !

Thanks,
Fernando

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

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

Reply via email to