Scroll down a bit on the page I sent for an example of how to retrieve a message from the system content provider: http://code.google.com/p/android-smspopup/source/browse/tags/SMSPopup%20v0.9.93/src/net/everythingandroid/smspopup/SMSPopupUtils.java#553
Cheers, Adam K www.everythingandroid.net On Apr 21, 4:16 am, Gulfam <[email protected]> wrote: > Hi all, > > Thanks for response. How i can get thread_id or message id ? > > Regards, > Gulfam > > On Apr 21, 9:14 am, Adam K <[email protected]> wrote: > > > > > You candeleteby message id, see > > here:http://code.google.com/p/android-smspopup/source/browse/tags/SMSPopup... > > > Cheers, > > > Adam Kwww.everythingandroid.net > > > On Mon, Apr 20, 2009 at 11:38 AM, avrono <[email protected]> wrote: > > > > Gulfram, > > > > As far as I can see you can onlydeleteandsmsby thread_id using the > > > content "content://sms/conversations/" > > > > Regards > > > Avron > > > > On Feb 20, 9:45 am, Gulfam Hassan <[email protected]> wrote: > > > > Hi, > > > > > I want toDeleteSMShow i candeleteit programmatically? > > > > I am receivingsmsin my application in this format string. "12345 > > > > username password" > > > > ****************************** > > > > i have post this thread on so many groups and forums but i dont receive > > > any > > > > reply from last one week. > > > > its very urgent for our product. so i am sending this mail to all of > > > you. > > > > ******************************************************************* > > > > public void onReceive(Context context, Intent intent) { > > > > > if(!intent.getAction().equals > > > > ("android.provider.Telephony.SMS_RECEIVED")) > > > > { > > > > return; > > > > } > > > > SmsMessage smsMsg[] = > > > > getMessagesFromIntent(intent);// here gettingsmssuccessfully > > > > > for(int i=0; i < smsMsg.length; i++) > > > > { > > > > receivedSMS = > > > > smsMsg[i].getDisplayMessageBody(); > > > > if(receivedSMS.startsWith("12345")) > > > > { > > > > String[] dataArray = > > > > MyUtility.breakIntoLines(receivedSMS, ' > > > > '); > > > > String userName = dataArray[1]; > > > > String userPassword = > > > dataArray[2]; > > > > > this.updateUsernamePassword(context, userName, userPassword );//here > > > saving > > > > data successfully > > > > > > > > Toast.makeText(context,"Settings > > > > saved", Toast.LENGTH_LONG).show > > > > (); > > > > > try{ > > > > ***********************here > > > > i want todeletethat perticullarsms*************** > > > > Uri uriSms = > > > > Uri.parse("content://sms/inbox"); > > > > Cursor c = > > > > context.getContentResolver().query(uriSms, null,null,null,null); > > > > int thread_id > > > =c.getCount(); > > > > //get the thread_id > > > > context.getContentResolver().delete(Uri.parse("content://sms/conversations/ > > > "+thread_id > > > > ),null,null); > > > > > }catch(Exception e) > > > > { > > > > Log.i("exception ",e.getMessage()); > > > > } > > > > > } > > > > } > > > > > } > > > > > } > > > > > after getting my required > > > > data i want todeletethis currently receivedsmsprogrammatically. > > > > data is very confidential in thissmsand i want todeleteit here > > > > after getting data and also clear it from notification bar.or i want to > > > > discard it because i dont want to show it in inbox > > > > any one can help me regarding this.can any one give me code snippet > > > > which was working perfectly for deletingsmsor discarding it. > > > > > Thanks & Regards, > > > > Gulfam --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

