Android 短信数据库详细总结分析 短信 sms 文件 /data/data/com.android.providers.telephony/databases/mmssms.db
这个数据库有13张表,sms表存了短信信息。

sms表的uri是 publicstaticfinalUriCONTENT_URI= Uri.parse("content://sms"); 表项含义,我猜的
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 //短信服务中心号码编号,可以得知该短信是从哪里发过来的

把源码补上。
在frameworks/base/core/java/android/provider/Telephony.java
/** *ThethreadIDofthemessage *<P>Type:INTEGER</P> */ publicstaticfinalStringTHREAD_ID="thread_id"; /** *Theaddressoftheotherparty *<P>Type:TEXT</P> */ publicstaticfinalStringADDRESS="address"; /** *ThepersonIDofthesender *<P>Type:INTEGER(long)</P> */ publicstaticfinalStringPERSON_ID="person"; /** *Thedatethemessagewassent *<P>Type:INTEGER(long)</P> */ publicstaticfinalStringDATE="date"; /** *Theprotocolidentifiercode *<P>Type:INTEGER</P> */ publicstaticfinalStringPROTOCOL="protocol"; /** *Hasthemessagebeenread *<P>Type:INTEGER(boolean)</P> */ publicstaticfinalStringREAD="read"; /** *TheTP-Statusvalueforthemessage,or-1ifnostatushas *beenreceived */ publicstaticfinalStringSTATUS="status"; us举例: publicstaticfinalintSTATUS_NONE=-1; publicstaticfinalintSTATUS_COMPLETE=0; publicstaticfinalintSTATUS_PENDING=64; publicstaticfinalintSTATUS_FAILED=128; /** *Thetypeofthemessage *<P>Type:INTEGER</P> */ publicstaticfinalStringTYPE="type"; 举例 publicstaticfinalintMESSAGE_TYPE_ALL=0; publicstaticfinalintMESSAGE_TYPE_INBOX=1; publicstaticfinalintMESSAGE_TYPE_SENT=2; publicstaticfinalintMESSAGE_TYPE_DRAFT=3; publicstaticfinalintMESSAGE_TYPE_OUTBOX=4; publicstaticfinalintMESSAGE_TYPE_FAILED=5;//forfailedoutgoingmessages publicstaticfinalintMESSAGE_TYPE_QUEUED=6;//formessagestosendlater /** *Whetherthe<code>TP-Reply-Path</code>bitwassetonthismessage *<P>Type:BOOLEAN</P> */ publicstaticfinalStringREPLY_PATH_PRESENT="reply_path_present"; /** *Thesubjectofthemessage,ifpresent *<P>Type:TEXT</P> */ publicstaticfinalStringSUBJECT="subject"; /** *Thebodyofthemessage *<P>Type:TEXT</P> */ publicstaticfinalStringBODY="body"; /** *Theservicecenter(SC)throughwhichtosendthemessage,ifpresent *<P>Type:TEXT</P> */ publicstaticfinalStringSERVICE_CENTER="service_center"; 转载自 http://hi.baidu.com/tclc2009/blog/item/63ab71ecca46ab382cf53409.html

更多相关文章

  1. android短信服务
  2. Android(安卓)ApiDemos示例解析(91):OS->SMS Messaging
  3. android 中管理短信
  4. android 截取验证码的两种实现方式
  5. 关于Android短信管理
  6. android 中管理短信
  7. Android(安卓)接受短信和发送短信
  8. Android发送短信
  9. 关于Android短信管理

随机推荐

  1. android UI进阶之弹窗的使用(2)--实现通讯
  2. Android(安卓)String类型转换为float、do
  3. Android网格布局的简单使用
  4. Android的framework层音量控制原理分析--
  5. Android常见小问题汇总
  6. Android(安卓)studio 3.2.0 使用Android(
  7. Android(安卓)recovery 工作原理
  8. Android中TextView内容过长加省略号,设置
  9. Android开机广播和关机广播
  10. Android开机广播和关机广播