簡體   English   中英

如何從Android中的特定號碼刪除彩信?

[英]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

Android中的MMS。 第2部分。使用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信息

在收件箱Android中保存/創建彩信

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM