android contacts2.db MIME类型“ TYPE”存储在数据表中的哪里,即不是mimetype_id?

时间:2018-08-13 16:11:39

标签: android android-contacts

来自Android的

databasecontacts.db具有一个名为data的表,该表具有名为mimetype_id的列,该列与在另一个名为mimetypes的表中找到的字符串表示形式相对应。但是我不明白的是:假设我们有一个直接从包android.provider中获取Phone类的示例;

public static final class Phone implements ContactsContract.DataColumnsWithJoins, ContactsContract.CommonDataKinds.CommonColumns {
    public static final Uri CONTENT_FILTER_URI = null;
    public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone_v2";
    public static final String CONTENT_TYPE = "vnd.android.cursor.dir/phone_v2";
    public static final Uri CONTENT_URI = null;
    public static final Uri ENTERPRISE_CONTENT_FILTER_URI = null;
    public static final String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
    public static final String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
    public static final String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
    public static final String NORMALIZED_NUMBER = "data4";
    public static final String NUMBER = "data1";
    public static final String SEARCH_DISPLAY_NAME_KEY = "search_display_name";
    public static final String SEARCH_PHONE_NUMBER_KEY = "search_phone_number";
    public static final int TYPE_ASSISTANT = 19;
    public static final int TYPE_CALLBACK = 8;
    public static final int TYPE_CAR = 9;
    public static final int TYPE_COMPANY_MAIN = 10;
    public static final int TYPE_FAX_HOME = 5;
    public static final int TYPE_FAX_WORK = 4;
    public static final int TYPE_HOME = 1;
    public static final int TYPE_ISDN = 11;
    public static final int TYPE_MAIN = 12;
    public static final int TYPE_MMS = 20;
    public static final int TYPE_MOBILE = 2;
    public static final int TYPE_OTHER = 7;
    public static final int TYPE_OTHER_FAX = 13;
    public static final int TYPE_PAGER = 6;
    public static final int TYPE_RADIO = 14;
    public static final int TYPE_TELEX = 15;
    public static final int TYPE_TTY_TDD = 16;
    public static final int TYPE_WORK = 3;
    public static final int TYPE_WORK_MOBILE = 17;
    public static final int TYPE_WORK_PAGER = 18;

现在,我们看到了不同的类型,例如“ TYPE_ISDN = 11”或TYPE_MOBILE = 2;我确实知道我们在数据表中有不同的数据列,在这种情况下为“ data1”或“ data4”,但是数据库中存储的ISDN类型信息在哪里。 即问题是:我如何从读取数据表中直接知道我刚刚读取的电话是手机,而不是传真,反之亦然。在这种情况下,保存的整数11或2在哪里?例如,由于我有5部手机,并且它们都标有家庭,工作等信息

0 个答案:

没有答案