简体   繁体   中英

An already running application to be informed about an incoming SMS - Windows Mobile 6.5

I have a C/C++ Windows Mobile 6.5 application that continuously runs on the phone. It needs to analyze the SMSes. How can I be notified in my application about an incoming SMS? I read in MSDN about the SmsSetMessageNotification() but this is starting an application once the SMS comes in, and in my case the application is already running, it just needs to be informed that a new SMS was received and then should have access to it in order to analize it and to decide if it's of any interest for the application or not.

So how can my already running application be informed about an incoming SMS which then needs to be analyzed?

I believe you need to use the IMailRuleClient to sign up for notifications of a text message being received.

There is a sample application as part of the sdk that demonstrates this functionality. You can download it from MSDN Code Samples

You can achieve your goal using the Radio Interface Layer (RIL) API. Download RIL.H to get started. Then use LoadLibrary and GetProcAddress to dynamically call the RIL functions from the DLL at runtime. You can setup a RIL notification callback to notify you when message activity happens. I found a code example here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM