如何清除android中的整个通话记录历史记录?目前我有这样的代码,只能清除特定的通话记录如何清除Android中的通话记录历史记录?
public void DeleteCallLogByNumber(String number) {
String queryString="NUMBER="+number;
this.getContentResolver().delete(CallLog.Calls.CONTENT_URI,queryString,null);
}
}
不理想所以评论不是一个答案,但你总是可以读取所有呼叫日志条目,并以这种方式删除它们...... – Basic 2012-08-02 22:36:02
试试这个? @Rpc(描述= “删除从呼叫日志条目 ”) 公共无效deleteAnEntryFromCallLog(字符串数) { 尝试 { 乌里CALLLOG_URI = Uri.parse(“ 内容:// call_log /呼叫”); (CALLLOG_URI,CallLog.Calls.NUMBER +“=?”,new String [] {number}); (例外e) { e.getMessage(); } } – 2012-08-02 22:37:09
@AlexanderWigmore does not work – dythe 2012-08-02 22:45:29