Thanks,

>if (errNone == error)
>{
>       //do you check to see if this is a message you want!!
>}

If it is not a sms I want, and I do nothing, will it automatically go to
default telephone application or I will have to do something to send it to
default telephone inbox ?

--cp


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Neil Whitworth
Sent: Friday, June 02, 2006 2:35 PM
To: Palm Developer Forum
Subject: Re: sms

cp wrote:
> I am trying to receive sms from a customized server. I have following
query.
> 
> 1. Can my application recive notification only when sms from our server
comes ? General telephony SMS should not notify my application, instead
notify telephony application
> 
> 2. If that is not possible, how do I filter the sms and send them to
default telephony application if that is not from our server ?
> 
> --cp
> 
Assuming you are working on a Treo (600/650/700p?), then I think 1 is 
impossible.

2 can be done. We use this to filter 'email push' messages from general 
SMS's


//Call PhnLibRegister to recieve SMS notifications...
// Register this application with the Phone library so it will receive 
the appropriate events
RetVal = PhnLibRegister (m_PhnlibRef, appFileCreator, phnServiceSMS );



Wait for a phnEvtMessageInd phone notification, then call PhnLibGetText 
to retrieve the text of the SMS message

                case phnEvtMessageInd:
                {
                        // a message has been received

                        error = LoadPhoneLibrary ();
                        if (errNone == error)
                        {
                                // CDMA workaround
                                smsRefNum = PhnLibGetDBRef(m_PhnlibRef);
                                // and get the message text
                                error = PhnLibGetText (m_PhnlibRef,
eventP->data.params.id, &messageH);
                                if (errNone == error)
                                {

                                        //do you check to see if this is a
message you want!!
                                }

                                PhnLibReleaseDBRef(m_PhnlibRef, smsRefNum);
// CDMA workaround

                                // unload if necessary
                                UnloadPhoneLibrary();
                        }

-- 
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