Delete call log in android for particular number

一笑奈何 提交于 2019-11-28 00:28:57
Adiii

Try this code to delete any particular number from history

String number="4666";//any number
Uri CALLLOG_URI = Uri.parse("content://call_log/calls"); 
context.getContentResolver().delete(CALLLOG_URI,CallLog.Calls.NUMBER +"=?",new String[]{number});

you can also delete call log by user name by doing this

context.getContentResolver().delete(CALLLOG_URI,CallLog.Calls.CACHED_NAME +"=?",new String[]{name});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!