[英]How to Delete a MMS message from a particular number in Android?
我想刪除Android中特定電話號碼的彩信。 我該怎么做? 我正在使用content:// mms-sms / conversations獲取消息的MMS列表,並嘗試使用以下查詢:
this.getContentResolver().delete(
Uri.parse("content://mms-sms/conversations/" + ThreadId),
"address=?", new String[] { "contact number" });`
但它僅適用於短信,不適用於彩信。 有人可以告訴我如何刪除特定的彩信嗎?
謝謝
請檢查以下詳細的教程鏈接,以在Android中讀取,寫入,刪除和更新MMS
也試試這個
Uri msgUri = ContentUris.withAppendedId(Mms.Inbox.Content_Uri,"1");
SqliteWrapper.delete(this, getContentResolver(), msgUri, null, null); (or) getContentResolver().delete(msguri, null, null);
編輯:
這是方法語法
public static Uri withAppendedId (Uri contentUri, long id)
而Uri是內容提供商中的MMS收件箱存儲網址
例如SMS收件箱Uri是“ content:// sms / inbox”
還請閱讀此頁面以獲取此處提供的MMS存儲Uri信息
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.