简体   繁体   中英

How to read and delete messages log in call logs?

I can read and delete all call log and sms/mms message using below content uris.

ContentResolver cr;
Cursor cursor = cr.query(contentUri, null, where, null, null);  // read
cr.delete(contentUri, where, null); // delete

Calls.CONTENT_URI; // Call Log Uri.
Sms.CONTENT_URI // SMS Uri // Uri.parse("content://sms")
Mms.CONTENT_URI // MMS Uri // Uri.parse("content://mms")

So I can get count of logs. and delete them.

But Text message logs (in contacts app. see attached images) are not deleted. (Messages are deleted)

My test device is Samsung Galaxy S4 mini.

在此处输入图片说明在此处输入图片说明

三星自定义消息日志不是标准的Android ContentProvider :没有标准的访问方式,除非三星为其实现了自定义ContentProvider ,否则可能无法访问它们。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM