HI,
To register for voice events...
Boolean Register(void)
{
Boolean libLoaded = false;
Err error = 0;
UInt16 libRef = 0;
error = LoadPhoneLibrary (&libRef);
if (!error)
{
// Register this application with the Phone library For Voice events
error = PhnLibRegister (libRef, appFileCreator, bReg ?phnServiceVoice :0 );
if(error != errNone)
Err error = 0;
UInt16 libRef = 0;
error = LoadPhoneLibrary (&libRef);
if (!error)
{
// Register this application with the Phone library For Voice events
error = PhnLibRegister (libRef, appFileCreator, bReg ?phnServiceVoice :0 );
if(error != errNone)
return false;
if (libLoaded)
(void)PhnLibClose (libRef);
return error;
}
Err LoadPhoneLibrary(UInt16 *libRefP)
{
Err (*LoadPhoneLib)(UInt16*);
UInt32 value;
if (!FtrGet (hsFtrCreator, hsFtrIDVersion, &value))
{
if (value < 0x5000000)
LoadPhoneLib = LoadPhoneLibraryon68k;
else
LoadPhoneLib = LoadPhoneLibraryTre600;
}
return LoadPhoneLibrary(libRefP);
}
{
Err (*LoadPhoneLib)(UInt16*);
UInt32 value;
if (!FtrGet (hsFtrCreator, hsFtrIDVersion, &value))
{
if (value < 0x5000000)
LoadPhoneLib = LoadPhoneLibraryon68k;
else
LoadPhoneLib = LoadPhoneLibraryTre600;
}
return LoadPhoneLibrary(libRefP);
}
To catch the notification....
PalmMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
{
if(cmd == 0x2bad || cmd == phnLibLaunchCmdEvent)
{
PhnEventPtr phoneEvent = (PhnEventPtr)cmdPBP;
if (phoneEvent->eventType == phnEvtConnectInd)
{
:: phnEvtConnectInd is for showing incomming call indication
::Give your alertbox here...
::FYI: Use phnEvtSubscriber to get caller info
::FYI: You will get phnEvtDisconnectInd when phone gets disconnected.
}
}
}
Regards,
Mehul
Prashant Batra <[EMAIL PROTECTED]> wrote:
Prashant Batra <[EMAIL PROTECTED]> wrote:
Huge thanks for your reply.Can you plz send me code for this too.Thanks
Mehul Patel <[EMAIL PROTECTED]> wrote:hi,Register for voice events and thencapture "phnEvtConnectInd" notification...which you get when the incomming call arrives..byeMehul
Prashant Batra <[EMAIL PROTECTED]> wrote:hi,Could you please tell me the code to be added in event loop when ever a phone calls comes.I actually want to give a alert when ever a phone call comes.Waiting for favourThanq in advance
Cordially
Prashant Batra
Jiyo cricket on Yahoo! India cricket -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Jiyo cricket on Yahoo! India cricket -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Cordially
Prashant Batra
Jiyo cricket on Yahoo! India cricket -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Jiyo cricket on Yahoo! India cricket
Jiyo cricket on Yahoo! India cricket -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Reply via email to
