开发者

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

开发者 https://www.devze.com 2023-03-29 20:11 出处:网络
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 inf开发者_如何学Goormation about sent s

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 inf开发者_如何学Goormation 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.


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.


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);

0

精彩评论

暂无评论...
验证码 换一张
取 消