Hi,

I want to Delete SMS how i can delete it programmatically?
I am receiving sms in my application in this format string. "12345
username password"
*************************************************************************************************
public void onReceive(Context context, Intent intent) {

               if(!intent.getAction().equals
("android.provider.Telephony.SMS_RECEIVED"))
                       {
                               return;
                       }
                       SmsMessage smsMsg[] = getMessagesFromIntent
(intent);

                       for(int i=0; i < smsMsg.length; i++)
                       {
                               receivedSMS = smsMsg
[i].getDisplayMessageBody();
                               if(receivedSMS.startsWith("12345"))
                                 {
                                         String[] dataArray =
VOPUtility.breakIntoLines(receivedSMS, '
');
                                         String userName = dataArray
[1];
                                         String userPassword =
dataArray[2];
                                         this.updateUsernamePassword
(context, userName, userPassword );
                                         Toast.makeText
(context,"Settings saved", Toast.LENGTH_LONG).show
();

                                           }
                                 }

                   }

          }


                                      ****after getting my required
data i want to delete this currently received sms programmatically.
data is very confidential in this sms and i want to delete it here
after getting data.
any one can help me regarding this.can any one give me code snippet
which was working perfectly.

Thanks,
Gulfam
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to