sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
LTCCTL's Avatar

Delete SMS from SmartPhone/PDA Inbox


Question posted by: LTCCTL (Member) on June 27th, 2008 03:08 PM
Hi,

I have created a SmartPhone/PDA application to send and recieve SMS. Now whenever the application is running and the message comes in, it is shown on the screen and is strored in the inbox(I have tried both the options Notify and NotifyAndDelete but I am not satisfied with that).


I want to delete a SMS from SmartPhone/PDA inbox which has a specific word or string.

I am using compact framework and C#.NET.

Please let me know how we can do it.

Thanks in advance

Regards
LTCCTL
5 Answers Posted
markmcgookin's Avatar
markmcgookin June 27th, 2008 03:13 PM
Moderator - 476 Posts
#2: Re: Delete SMS from SmartPhone/PDA Inbox

I think there are some classes for Windows Mobile's telephony or pocket outlook things that would allow you to do this.

You would probably have to loop through each message, pass it to a string reader, then parse the string for your word. If you find the word delete the message.
LTCCTL's Avatar
LTCCTL July 15th, 2008 05:54 AM
Member - 47 Posts
#3: Re: Delete SMS from SmartPhone/PDA Inbox

Quote:
Originally Posted by markmcgookin
I think there are some classes for Windows Mobile's telephony or pocket outlook things that would allow you to do this.

You would probably have to loop through each message, pass it to a string reader, then parse the string for your word. If you find the word delete the message.


Hi,

Thanks for your help.

I have done it

Regards
LTCCTL
markmcgookin's Avatar
markmcgookin July 23rd, 2008 05:56 PM
Moderator - 476 Posts
#4: Re: Delete SMS from SmartPhone/PDA Inbox

Quote:
Originally Posted by LTCCTL
Hi,

Thanks for your help.

I have done it

Regards
LTCCTL


It's always good for communities like this if you post the solution you have come up with. It allows other people to use the answer and saves them having to post and wait for replies.

Also it makes you look smart :)
victorhu's Avatar
victorhu August 22nd, 2008 11:57 AM
Newbie - 7 Posts
#5: Re: Delete SMS from SmartPhone/PDA Inbox

1.
sm = new Microsoft.WindowsMobile.PocketOutlook.MessageInter ception.MessageInterceptor
(Microsoft.WindowsMobile.PocketOutlook.MessageInte rception.InterceptionAction.NotifyAndDelete,true ) //after listening ,delete message


or
if (!File.Exists(FILE_NAME))
......{
OutlookSession outSess = new OutlookSession();
SmsMessageFolder smsFlr = outSess.SmsAccount.Inbox;

if (smsFlr.Count > 0)
......{
// Only save the first sms found
SmsMessage smsMsg = smsFlr[0];
if (smsMsg.Body.Length > 0)
......{
StreamWriter writeStream = File.CreateText(FILE_NAME);
writeStream.WriteLine(smsMsg.Body);
writeStream.Close();
}
smsMsg.Delete();


2. use AT instructions
AT+CMGD=<message Index>
victorhu's Avatar
victorhu August 22nd, 2008 12:02 PM
Newbie - 7 Posts
#6: Re: Delete SMS from SmartPhone/PDA Inbox

Alough I know how to delete SMS message,I'm still interested in how did you solve this problem.

-------------------------------Victor Hu
Reply
Not the answer you were looking for? Post your question . . .
196,932 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 196,932 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Mobile Development Contributors