hi All,
I want to retreive the caller's ID whenever an incoming call comes and am using the following code :
case phnLibLaunchCmdEvent:
phoneEventP = (PhnEventPtr)cmdPBP;
switch (phoneEventP->eventType) {
case phnEvtConnectInd:
if(phoneEventP->acknowledge == false)
{
phoneEventP->acknowledge = true;
}else {
phoneEventP->acknowledge = false;
}
break;
case phnEvtSubscriber:
UInt16 smsLibRef;
PhnAddressHandle address;
;
err = HsGetPhoneLibrary(&smsLibRef);
err = PhnLibOpen(smsLibRef);
address = phoneEventP->data.info.caller;
number = PhnLibGetField(smsLibRef, address, phnAddrFldPhone);
phoneEventP->eventType = phnEvtConnectInd;
phoneEventP->acknowledge = false;
EvtAddEventToQueue((EventType *)phoneEventP);
phoneEventP = (PhnEventPtr)cmdPBP;
switch (phoneEventP->eventType) {
case phnEvtConnectInd:
if(phoneEventP->acknowledge == false)
{
phoneEventP->acknowledge = true;
}else {
phoneEventP->acknowledge = false;
}
break;
case phnEvtSubscriber:
UInt16 smsLibRef;
PhnAddressHandle address;
;
err = HsGetPhoneLibrary(&smsLibRef);
err = PhnLibOpen(smsLibRef);
address = phoneEventP->data.info.caller;
number = PhnLibGetField(smsLibRef, address, phnAddrFldPhone);
phoneEventP->eventType = phnEvtConnectInd;
phoneEventP->acknowledge = false;
EvtAddEventToQueue((EventType *)phoneEventP);
But this one is not working ,i am unable to get anything in number.
Can anyone help me in that ?
Cordially
Prashant Batra
Prashant Batra
Yahoo! India Answers: Share what you know. Learn something new Click here
Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
