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

    1. Telephony.ThreadsColumns
    Columns for the "threads" table used by MMS and SMS.

    在Telephony.ThreadsColumns接口中定义了一些字符串常量,每个常量的值都是数据库表threads的一个字段。

    _ID

    "_id"

    INTEGER (long)

    The unique ID for a row.

    DATE

    "date"

    INTEGER (long)

    The date at which the thread was created.

    RECIPIENT_IDS

    "recipient_ids"

    TEXT

    A string encoding of the recipient IDs of the recipients of the message, in numerical order and separated by spaces.

    MESSAGE_COUNT

    "message_count"

    INTEGER

    The message count of the thread.

    READ

    "read"

    INTEGER

    Indicates whether all messages of the thread have been read.

    SNIPPET

    "snippet"

    TEXT

    The snippet of the latest message in the thread.

    SNIPPET_CHARSET

    "snippet_cs"

    INTEGER

    The charset of the snippet.

    TYPE

    "type"

    INTEGER

    Type of the thread, either Threads.COMMON_THREAD or Threads.BROADCAST_THREAD.

    ERROR

    "error"

    INTEGER

    Indicates whether there is a transmission error in the thread.

    HAS_ATTACHMENT

    "has_attachment"

    INTEGER

    Indicates whether this thread contains any attachments.

    2. 在Telephony.Threads类中定义threads.type的两个可选值。

    public static final int COMMON_THREAD    = 0;
    public static final int BROADCAST_THREAD = 1;

    3. 在Telephony.Threads中定义了一些常量。

    private static final Uri THREAD_ID_CONTENT_URI = Uri.parse(
            "content://mms-sms/threadID");
    public static final Uri CONTENT_URI = Uri.withAppendedPath(
            MmsSms.CONTENT_URI, "conversations");
    public static final Uri OBSOLETE_THREADS_URI = Uri.withAppendedPath(
            CONTENT_URI, "obsolete");

    4. 定义Telephony.MmsSms类。

    Contains all MMS and SMS messages.

    5. 在Telephony.MmsSms中定义了一些URI常量。

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

    public static final Uri CONTENT_CONVERSATIONS_URI = Uri.parse(
            "content://mms-sms/conversations");

    public static final Uri CONTENT_FILTER_BYPHONE_URI = Uri.parse(
            "content://mms-sms/messages/byphone");

    public static final Uri CONTENT_UNDELIVERED_URI = Uri.parse(
            "content://mms-sms/undelivered");

    public static final Uri CONTENT_DRAFT_URI = Uri.parse(
            "content://mms-sms/draft");

    public static final Uri CONTENT_LOCKED_URI = Uri.parse(
            "content://mms-sms/locked");

    public static final Uri SEARCH_URI = Uri.parse(
            "content://mms-sms/search");

    6. 在Telephony.Threads中定义了两个方法来获取或者创建ThreadId。

    public static long getOrCreateThreadId(Context context, String recipient)

    public static long getOrCreateThreadId(Context context, Set<String> recipients)

  • 相关阅读:
    [转]我在Facebook学到的10个经验
    [转]MPlayer快捷键&参数设置>系统开销最少的影音播放器
    [转]国外程序员推荐:每个程序员都应读的书
    Linux运维:CentOS6和7的区别
    将数组中指定的前N位移动到数组的最后面
    DataReader和DataSet区别
    求数组中和最大的子数组与始末下标
    使用XPathExpression类对XML文件进行排序
    配置WebSite的IIS时遇到的问题与解决方法
    已知一个整数N,求另外一个整数M,使得M本身 + M各个位上的数 = N
  • 原文地址:https://www.cnblogs.com/fengzhblog/p/3191720.html
Copyright © 2011-2022 走看看