歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> Android MMS 數據存取數據表

Android MMS 數據存取數據表

日期:2017/3/1 9:57:23   编辑:Linux編程

MMS模塊總共包含17張表:addr、Android_metadata、attachments、canonical_addresses、drm、part、pdu、pending_msgs、rate、raw、sms、sr_pending、threads、words、words_content、words_segdir、words_segments。

其中,pending_msgs表用於存儲待發送或下載的短信與彩信(有待證實),使用pdu中的觸發器進行插入和刪除。raw表用於存儲接收中的長短信或分段彩信通知。drm用於彩信權限管理。words開頭的表存儲了短彩信中的單詞,用於搜索時使用。attachments、rate、sr_pending表作用未知。android_metadata表存儲的是語言信息,就一條記錄。

下面是一些常用表的字段及其說明:

threads表

列名

類型

說明

_id

integer

唯一標識,自增,從1開始

date

integer

會話最新更新時間

message_count

integer

當前會話所包含的消息數量

recipient_ids

text

接收者(canonical_addresses表的id)列表,所有接收者以空格隔開

snippet

text

最新更新的消息的內容(彩信為主題,短信為正文)

snippet_cs

integer

snippet的編碼方式,彩信:UTF-8為106,短信為0

read

integer

是否有未讀信息:0-未讀,1-已讀

type

integer

會話類型,0-普通會話(只有一個接收者),1-廣播會話(多個接收者)

error

integer

發送失敗的消息(type=5)的數量

has_attachment

integer

是否有附件:0-無,1-有

sms表

列名

類型

說明

_id

integer

唯一標識,自增,從1開始

thread_id

integer

threads表的id

address

text

接收者手機號碼,對於一個會話,有可能含有多個接收者,每個人都將收到一條短信

person

integer

聯系人(模塊)列表裡的序號,陌生人為null

date

integer

時間,以豪秒來表示

protocol

integer

協議,分為:0-SMS_RPOTO,1-MMS_PROTO。成功發送後設置。

read

integer

是否閱讀:0-未讀,1-已讀

status

integer

狀態:-1默認值,0-complete,64-pending,128-failed

type

integer

ALL=0;INBOX=1;SENT=2;DRAFT=3;OUTBOX=4;FAILED=5;QUEUED=6;

reply_path_present

integer

TP-Reply-Path位的值 0/1

subject

text

短信的主題,默認為空

body

text

短信內容

service_center

text

短信服務中心號碼編號

locked

integer

此條短信是否已由用戶鎖定,0-未鎖定,1-已鎖定

error_code

integer

錯誤代碼,有哪些值暫時未知

seen

integer

用於指明該消息是否已被用戶看到(非閱讀,點開會話列表即可,不用打開會話),僅對收到的消息有用

Copyright © Linux教程網 All Rights Reserved