android常用資料庫欄位描述

來源:互聯網
上載者:User

android常用資料庫欄位描述
1.簡訊資料庫
String strUriInbox = "content://sms";
Uri uriSms = Uri.parse(strUriInbox);
Cursor c_groups = managedQuery( uriSms , new String[] { "date","person" }, select, null, "date DESC");

strColumnName=_id                strColumnValue=48                  //短訊息序號 
strColumnName=thread_id          strColumnValue=16                  //對話的序號(conversation)
strColumnName=address            strColumnValue=+8613411884805      //寄件者地址,手機號
strColumnName=person              strColumnValue=null                //寄件者,返回一個數字就是連絡人清單裡的序號,陌生人為null
strColumnName=date                strColumnValue=1256539465022        //日期  long型,想得到具體日期自己轉換吧!
strColumnName=protocol            strColumnValue=0                    //協議
strColumnName=read                strColumnValue=1                    //是否閱讀
strColumnName=status              strColumnValue=-1                  //狀態
strColumnName=type                strColumnValue=1                    //類型 1是接收到的,2是發出的
strColumnName=reply_path_present  strColumnValue=0                    //
strColumnName=subject            strColumnValue=null                //主題
strColumnName=body                strColumnValue=您好                                                      //短訊息內容
strColumnName=service_center      strColumnValue=+8613800755500      //簡訊服務中心號碼編號,可以得知該簡訊是從哪裡發過來的見下表


4.其他資料庫
//Available Uri string
content://contacts/people    //本地連絡人清單資訊
content://contacts/phones    //本地連絡人清單資訊
content://call_log/calls/    //本地通話記錄       

content://mms            多媒體訊息
content://mms-sms/threadID
content://mms-sms/conversations
content://mms-sms/messages/byphone
content://mms-sms/undelivered
content://mms-sms/draft


String strUriInbox        = "content://sms/inbox";        //SMS_INBOX:1
String strUriFailed      = "content://sms/failed";      //SMS_FAILED:2
String strUriQueued      = "content://sms/queued";      //SMS_QUEUED:3
String strUriSent        = "content://sms/sent";        //SMS_SENT:4
String strUriDraft        = "content://sms/draft";        //SMS_DRAFT:5
String strUriOutbox      = "content://sms/outbox";      //SMS_OUTBOX:6
String strUriUndelivered  = "content://sms/undelivered";  //SMS_UNDELIVERED
String strUriAll          = "content://sms/all";          //SMS_ALL
String strUriConversations= "content://sms/conversations";//you can delete one conversation by thread_id
String strUriAll          = "content://sms"              //you can delete one message by _id


摘自 Central-Perk的專欄

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.