The only way to delete call history is to use ContentResolver, example:
GetContentResolver () Delete (call CONTENT_URI, null, null); Is there another way to do this?
Uri Uri = Uri.Parse ("content: // call_log / call"); Int d = getContentResolver () Remove (Yuri, blank, empty); D Returned record
Also check the code below
int res = Call_logs.this.getContentResolver ( ). Delete (android.provider.CallLog.Calls.CONTENT_URI, "_ID =" + Calls_id_list.get (i), tap); If (res == 1) {// delete the log} other {// do not delete the log} Here the call_ id_list call is an array of call log.
Comments
Post a Comment