Reputation: 105
I am doing sample application using windows mobile 5.0. When I receive an SMS, I want to check for certain criteria (eg: "Honda"). If I find that word, I will do my process, if not, it must be stored in the Inbox.
I wrote the code receiving SMS and searching the criteria, but I don't know how to put the SMS in the Inbox.
Anybody got an idea for doing this just give me hint I will do on my own.
Upvotes: 0
Views: 1779
Reputation: 105
The first step in catching received SMS text messages is to create an instance of the MessageInterceptor
class that lives in the Microsoft.WindowsMobile.PocketOutlook
assembly. You need to be careful about where you define this instance as if it goes out of scope and is garbage collected the message interception will stop.
MessageInterceptor interceptor =
new MessageInterceptor(InterceptionAction.NotifyAndDelete);
An InterceptionAction
is passed to the constructor. This parameter defines the behavior that occurs when a message is received.
The two options are:
Upvotes: 0
Reputation: 23016
Chris has written a sample application which is similar to what you are looking for. Mobile SMS Remote Read the blog post and try out the samepl code. Once you understand how it works then try your code. If you have any questions, post it here. Please avoid asking us to code the entire project for you.
Upvotes: 1