我无法获得适用于android中收件箱彩信数量的值

时间:2013-03-11 12:20:40

标签: java android

如何在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)) 

0 个答案:

没有答案