Wednesday, December 14, 2011

delete all call history by a particular number in android phone

To delete all call history associated with a particular number from the original call history of android phone.
By executing the below lines will delete  all call history by a particular number will gets erased permenently.

        String strUriCalls = "content://call_log/calls"; // URI for CallLog in 2.2 and above
        Uri UriCalls = Uri.parse(strUriCalls);
        String queryString = "NUMBER='" + number + "'";
        Log.v("Number", queryString);
        int noofDeletedRows = getContentResolver().delete(UriCalls, queryString, null);
        Log.v("Number", "Deleted Rows deleted"+noofDeletedRows +" with the specified number:" + number);
Works on version 2.2 and above.


  1. how to execute this? where should i type all these?

  2. I want to use pin less calling with registered numbers but i also want to control my bill by viewing and tracking call history online from all registered numbers .


Android Developers Blog

Ram's shared items