0
我正在實施此處討論的方法How to Read MMS Data in Android。這裏是代碼片段:查詢未收到彩信
ContentResolver contentResolver = getContentResolver();
final String[] projection = new String[]{"*"};
Uri uri = Uri.parse("content://mms-sms/conversations/");
Cursor query = contentResolver.query(uri, projection, null, null, null);
當我試圖通過遊標獲取數據時,我沒有得到MMS消息的ID。我只收到短信的ID。
ContentResolver contentResolver = getContentResolver();
final String[] projection = new String[]{"*"};
Uri MMSSMS_FULL_CONVERSATION_URI = Uri.parse("content://mms-sms/conversations");
Uri uri = MMSSMS_FULL_CONVERSATION_URI.buildUpon().
appendQueryParameter("simple", "true").build();
Cursor query = contentResolver.query(uri, projection, null, null, null);
笑納的答案,如果你有你的:) –
這可能是三星設備,如銀河S3失敗,從ContentProvider的:( 一個NullPointerException 唯一的解決方案是將URI更改爲「content:// mms-sms/conversations /?simple = true」 –