首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何获取彩信id Android应用程序

如何获取彩信id Android应用程序
EN

Stack Overflow用户
提问于 2012-04-09 02:26:45
回答 1查看 1.6K关注 0票数 5

谁能帮我找到彩信id,我使用this代码来获取彩信文本,但我不知道彩信id (mmsId),所以我停止了!!

我将非常感谢你的帮助

萨米拉

EN

回答 1

Stack Overflow用户

发布于 2013-03-16 13:38:22

代码语言:javascript
复制
Uri mmsInboxUri = Uri.parse("content://mms");               
Cursor mmsInboxCursor = getContentResolver().query(mmsInboxUri ,new String[]     
    {"_id","msg_box","ct_t","date"}, "msg_box=1 or msg_box=2", null, null);
int count = mmsInboxCursor.getCount(); 
if(mmsInboxCursor != null){

    try{

         if (mmsInboxCursor.moveToFirst())
         {                  
            do{

                System.out.println("<====MONITORING MESSAGES====>");                                
                int id = mmsInboxCursor.getString(0); 
              }while(mmsInboxCursor.moveToNext());
        }
    }catch (Exception e) {

        System.out.println("MMSMonitor :: startMMSMonitoring Exception== "+ e.getMessage());
    }
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10065249

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档