简体   繁体   中英

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

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.

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

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.

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