在我的应用程序中,我想删除特定号码的短信/通话,我是android新手,任何机构都可以帮助我
For calls: use content provider described here: http://d.android.com/reference/android/provider/CallLog.Calls.html
I'm not sure about SMS.
I use this to delete a particular message from the SMS inbox:
//Delete entire SMS thread.
getContext().getContentResolver().delete(
Uri.parse("content://sms/conversations/" + threadID),
null,
null);
//Delete single message.
getContext().getContentResolver().delete(
Uri.parse("content://sms/" + messageID),
null,
null);
These work for me given a valid Thread ID or Message ID.
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.