1

如何在 Android 中获得 MMS 收件箱和已发送箱的准确计数?

Uri mmsInboxUri = Uri.parse("content://mms/inbox");                 
    Cursor mmsInboxCursor = getContentResolver().query(mmsInboxUri ,new String[] {"_id","ct_t"}, null, null, null);
    int count = mmsInboxCursor.getCount();          
    if (mmsInboxCursor != null) 
    {
        if (mmsInboxCursor.moveToFirst())
        {
            coloumns = mmsInboxCursor.getColumnNames(); 
            //String subject = mmsInboxCursor.getString(mmsInboxCursor.getColumnIndex("sub"));
            String string = mmsInboxCursor.getString(1);                        
            if ("application/vnd.wap.multipart.related".equals(string)) 
4

0 回答 0