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/

Reply via email to