zoukankan      html  css  js  c++  java
  • Android API之Telephony.Sms

    Telephony.Sms

    Contains all text based SMS messages. 包含基于SMS消息的所有文本。

    1.sms表结构。

    _ID

    _id

    INTEGER(long)

    The unique ID for a row.

    TYPE

    type

    INTEGER

    消息的类型。有7个可选值。

    int MESSAGE_TYPE_ALL    = 0;
    int MESSAGE_TYPE_INBOX  = 1;
    int MESSAGE_TYPE_SENT   = 2;
    int MESSAGE_TYPE_DRAFT  = 3;
    int MESSAGE_TYPE_OUTBOX = 4;
    int MESSAGE_TYPE_FAILED = 5;
    int MESSAGE_TYPE_QUEUED = 6;

    THREAD_ID

    thread_id

    INTEGER

    The thread ID of the message

    ADDRESS

    address

    TEXT

    The address of the other party

    PERSON_ID

    person

    INTEGER(long)

    The person ID of the sender

    DATE

    date

    INTEGER(long)

    The date the message was received

    DATE_SENT

    date_sent

    INTEGER(long)

    The date the message was sent

    READ

    read

    INTEGER(boolean)

    Has the message been read

    SEEN

    seen

    INTEGER

    Indicates whether this message has been seen by the user. The "seen" flag will be used to figure out whether we need to throw up a statusbar notification or not.

    STATUS

    status

    INTEGER

    The TP-Status value for the message, or -1 if no status has been received.

    有4个可选值。

    STATUS_NONE = -1;
    STATUS_COMPLETE = 0;
    STATUS_PENDING = 32;
    STATUS_FAILED = 64;

    SUBJECT

    subject

    TEXT

    The subject of the message, if present

    BODY

    body

    TEXT

    The body of the message

    PERSON

    person

    INTEGER(long)

    The id of the sender of the conversation, if present

    PROTOCOL

    protocol

    INTEGER

    The protocol identifier code

    REPLY_PATH_PRESENT

    reply_path_present

    INTEGER(boolean)

    Whether the TP-Reply-Path bit was set on this message

    SERVICE_CENTER

    service_center

    TEXT

    The service center (SC) through which to send the message, if present

    LOCKED

    locked

    INTEGER(boolean)

    Has the message been locked?

    ERROR_CODE

    error_code

    INTEGER

    Error code associated with sending or receiving this message

    META_DATA

    meta_data

    TEXT

    Meta data used externally

    2. 在Sms类中定义了CONTENT_URI

    public static final Uri CONTENT_URI = Uri.parse("content://sms");

    3. 在Sms类中定义了DEFAULT_SORT_ORDER

    public static final String DEFAULT_SORT_ORDER = "date DESC";

  • 相关阅读:
    第六课 课程重点(仿站及常见代码用法)
    第七课 课程重点(js、声明变量、数据类型)
    html作业及答案
    【实用代码】选项卡切换——带标题底纹样式
    CSS 样式表(小结)
    各大常用浏览器兼容性代码
    【小练习】“表格”制作及答案
    第一周综合练习
    第五课 课程重点(z-index、overflow、浏览器兼容性)
    当前单元测试主流工具
  • 原文地址:https://www.cnblogs.com/fengzhblog/p/3193973.html
Copyright © 2011-2022 走看看