Samsung sms in call log, how can I delete it?

2019-06-06 19:36发布

With the new Android 2.2+ operating systems deployed on Samsung phones, the call log has been replaced with a special super log. The super log contains also the information about sent sms. How I can delete this type of log? Can I use a particular Uri (content://...) to delete it? I read that Samsung uses the LogsProvider.apk to manage logs, is there the open source code of it?

Thanks. Denis.

2条回答
Viruses.
2楼-- · 2019-06-06 20:08

Uri to be used for deleting Samsung log is "content://logs/historys".

Use this Uri to delete all the sms log of a particular number.

String smsLogUri = "content://logs/historys";

Context.getContentResolver().delete(Uri.parse(smsLogUri), " logtype = 300 and number like ?", new String[]{phoneNumber});

logtype= 300 is used to delete only sms log. If you want to delete sms log of all numbers then use:

Context.getContentResolver().delete(Uri.parse(smsLogUri), " logtype = 300 ", null);

查看更多
在下西门庆
3楼-- · 2019-06-06 20:21

You can try to delete the calls using this:

context.getContentResolver().delete(android.provider.CallLog.Calls.CONTENT_URI,
                null, null);

I don't think **LogsProvider** app Samsung is open source.

查看更多
登录 后发表回答