You need to iterate through your Cursor and get the _id values of the entries you want to delete (the ones who number starts with + or 00). Then you can delete that individual entries.
// assume the row you want to delete has an _id value of 2 getContentResolver().delete(delUri, "_id=2", null) What you were doing was incorrect because you were setting the _id to cursor.getCount() which doesn't make sense. Eric On Mar 12, 3:33 am, Gulfam <[email protected]> wrote: > Hi, > > I have deleted whole call log by the following statement > context.getContentResolver().delete > (CallLog.Calls.CONTENT_URI,null,null); > > but i am facing problem to delete particular call log from call log > list by the following code any one can help me. > if any one have successfully delete particular call log please change > in my following code i want to delete that numbers form call log that > starts with + or 00 its urgent. > > Uri delUri = Uri.withAppendedPath(CallLog.Calls.CONTENT_URI,""); > Cursor cursor = context.getContentResolver().query > (delUri,null,null,null,null); > > > context.getContentResolver().delete > (delUri,"_id="+cursor.getCount(),null); > > 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 -~----------~----~----~----~------~----~------~--~---

