how to delete/remove call log from application. I am doing like this
this.getContentResolver().delete(CallLog.Calls.CONTENT_URI,null,null);
it not working.
how to delete/remove call log from application. I am doing like this
this.getContentResolver().delete(CallLog.Calls.CONTENT_URI,null,null);
it not working.
Accepted answer will delete all calls from call log for a specific number. If you want to delete a only single call you can do it by passing CallLogId to that function and run this query.
Here is an improved way, for example if the stored number in database is like:"914111222" this method can deal with numbers like:"+98 914 111 2222":
it requires permission as:
You need to give only this permission to work along with this method:
Its working perfectly for me. I've tested it on my Moto-G running Kitkat 4.4.2 and Samsung Note with Jelly Bean 4.1.
The existing solution will not delete numbers with 0 or + prefix. For this to work for all phone numbers, one needs to put the number in single quotes, like so:
Hope this helps.
Make sure u have following permissions in
Manifest.xml
:For deleting call logs for particular number try this way: