473,382 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Delete SMS from SmartPhone/PDA Inbox

49
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
Jun 27 '08 #1
6 7440
markmcgookin
648 Expert 512MB
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.
Jun 27 '08 #2
LTCCTL
49
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
Jul 15 '08 #3
markmcgookin
648 Expert 512MB
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 :)
Jul 23 '08 #4
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>
Aug 22 '08 #5
Alough I know how to delete SMS message,I'm still interested in how did you solve this problem.

-------------------------------Victor Hu
Aug 22 '08 #6
I tried below code snippet to delete

Getting error on this line SmsMessageFolder smsFlr = outSess.SmsAccount.Inbox; saying No priveleges to access SmsAccount.Inbox

Can somebody help with this or post a working snippet to delete message from inbox


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();
Jul 14 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Andrew Banks | last post by:
I own VS.NET and am wondering what else I need to develop for the Smartphone 2002 platform? What languages can I develop for the Smartphone 2002 in and does it support ..NET? Thanks in advance,...
1
by: MEGASILVER | last post by:
Hi, I am very new to this, but is there anyway I can play a wma file on the smartphone from my application? I need this urgently, any help would be greatly appreciated. Thank you!!!
5
by: Cooley | last post by:
hi, Can i develope software for SmartPhone device??? (what i need, and where i can find) where i can find Compact Framework Redistributable??? in my VS .NET2003 it is include??? i find a CF...
4
by: Philip Nestingen | last post by:
I wrote a function to delete specific messages in an archive sync. It works just find as long as the url (file name) does not include any illegal characters. Is there a way to use cdoex to delete...
4
by: radhikalea85 | last post by:
Hi Guys, Just want to know one thing..if i delete a mail from inbox/outbox, does it get deleted in the mail server too?..please reply asap.. Thanks and Regards, Radhika
2
by: amrit sahay | last post by:
Hello, How can i delete sms from inbox of phone memory of windows mobile using compact framework(C#). Amrit
3
by: LTCCTL | last post by:
Hi All, I am trying to create a service for smartphone which uses Windows Mobile 5. When ever I switch on the Smartphone that service should run. How can we do it? Please give some...
1
by: LTCCTL | last post by:
Hi all, I have created an application to send and recieve a particular type of message, now when the message comes in, the application grabs the message and show it on the screen, but when we...
0
by: amitsd1 | last post by:
How can I delete inbox sms of window mobile 5 or 6 with vb.net or C#. I Want to delete SMS by Message ItemID. I have developed a window mobile application like messaging application so i could not...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.