Most visited

Recently visited

Added in API level 5

ContactsContract.CommonDataKinds.Im

public static final class ContactsContract.CommonDataKinds.Im
extends Object implements ContactsContract.DataColumnsWithJoins, ContactsContract.CommonDataKinds.CommonColumns

java.lang.Object
   ↳ android.provider.ContactsContract.CommonDataKinds.Im


代表IM地址的数据类型

您可以使用为 ContactsContract.Data定义的所有列以及以下别名。

Column aliases

Type Alias Data column
String DATA DATA1
int TYPE DATA2 Allowed values are:

String LABEL DATA3
String PROTOCOL DATA5

允许值:

String CUSTOM_PROTOCOL DATA6

Summary

Constants

String CONTENT_ITEM_TYPE

将其存储在数据表中时使用的MIME类型。

String CUSTOM_PROTOCOL

String EXTRA_ADDRESS_BOOK_INDEX

将这个查询参数添加到一个URI以获取由地址簿索引分组的行计数作为游标额外。

String EXTRA_ADDRESS_BOOK_INDEX_COUNTS

相应组的组计数数组。

String EXTRA_ADDRESS_BOOK_INDEX_TITLES

地址簿索引标题数组,按照与游标中的数据相同的顺序返回。

String PROTOCOL

这个列应该填入一个定义的常量,例如

int PROTOCOL_AIM

int PROTOCOL_CUSTOM

int PROTOCOL_GOOGLE_TALK

int PROTOCOL_ICQ

int PROTOCOL_JABBER

int PROTOCOL_MSN

int PROTOCOL_NETMEETING

int PROTOCOL_QQ

int PROTOCOL_SKYPE

int PROTOCOL_YAHOO

int TYPE_HOME

int TYPE_OTHER

int TYPE_WORK

Inherited constants

From interface android.provider.ContactsContract.CommonDataKinds.CommonColumns
From interface android.provider.BaseColumns
From interface android.provider.ContactsContract.DataColumns
From interface android.provider.ContactsContract.StatusColumns
From interface android.provider.ContactsContract.RawContactsColumns
From interface android.provider.ContactsContract.ContactsColumns
From interface android.provider.ContactsContract.ContactNameColumns
From interface android.provider.ContactsContract.ContactOptionsColumns
From interface android.provider.ContactsContract.ContactStatusColumns
From interface android.provider.ContactsContract.DataUsageStatColumns
From interface android.provider.ContactsContract.CommonDataKinds.BaseTypes

Public methods

static final CharSequence getProtocolLabel(Resources res, int type, CharSequence label)

返回 CharSequence最能描述给定的协议,可能代给定 CUSTOM_PROTOCOL为值 PROTOCOL_CUSTOM

static final int getProtocolLabelResource(int type)

返回最能描述给定的字符串资源 PROTOCOL

static final CharSequence getTypeLabel(Resources res, int type, CharSequence label)

返回一个 CharSequence最能描述给定的类型,可能取代定 LABEL的价值 TYPE_CUSTOM

static final int getTypeLabelResource(int type)

返回最能描述给定的 TYPE的字符串资源。

Inherited methods

From class java.lang.Object

Constants

CONTENT_ITEM_TYPE

Added in API level 5
String CONTENT_ITEM_TYPE

将其存储在数据表中时使用的MIME类型。

常量值:“vnd.android.cursor.item / im”

CUSTOM_PROTOCOL

Added in API level 5
String CUSTOM_PROTOCOL

常量值:“data6”

EXTRA_ADDRESS_BOOK_INDEX

Added in API level 21
String EXTRA_ADDRESS_BOOK_INDEX

将这个查询参数添加到一个URI以获取由地址簿索引分组的行计数作为游标额外。 对于大多数语言来说,它是排序键的第一个字母。 该参数不影响游标的主要内容。

 Example:

 import android.provider.ContactsContract.Contacts;

 Uri uri = Contacts.CONTENT_URI.buildUpon()
          .appendQueryParameter(Contacts.EXTRA_ADDRESS_BOOK_INDEX, "true")
          .build();
 Cursor cursor = getContentResolver().query(uri,
          new String[] {Contacts.DISPLAY_NAME},
          null, null, null);
 Bundle bundle = cursor.getExtras();
 if (bundle.containsKey(Contacts.EXTRA_ADDRESS_BOOK_INDEX_TITLES) &&
         bundle.containsKey(Contacts.EXTRA_ADDRESS_BOOK_INDEX_COUNTS)) {
     String sections[] =
             bundle.getStringArray(Contacts.EXTRA_ADDRESS_BOOK_INDEX_TITLES);
     int counts[] = bundle.getIntArray(Contacts.EXTRA_ADDRESS_BOOK_INDEX_COUNTS);
 }
 

常量值:“android.provider.extra.ADDRESS_BOOK_INDEX”

EXTRA_ADDRESS_BOOK_INDEX_COUNTS

Added in API level 21
String EXTRA_ADDRESS_BOOK_INDEX_COUNTS

相应组的组计数数组。 包含与EXTRA_ADDRESS_BOOK_INDEX_TITLES数组相同数量的元素。

TYPE:int []

常量值:“android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS”

EXTRA_ADDRESS_BOOK_INDEX_TITLES

Added in API level 21
String EXTRA_ADDRESS_BOOK_INDEX_TITLES

地址簿索引标题数组,按照与游标中的数据相同的顺序返回。

TYPE:String []

常量值:“android.provider.extra.ADDRESS_BOOK_INDEX_TITLES”

PROTOCOL

Added in API level 5
String PROTOCOL

该列应该填入一个定义的常量,例如PROTOCOL_YAHOO 如果此列的值为PROTOCOL_CUSTOM ,则CUSTOM_PROTOCOL应包含自定义协议的名称。

常量值:“data5”

PROTOCOL_AIM

Added in API level 5
int PROTOCOL_AIM

常量值:0(0x00000000)

PROTOCOL_CUSTOM

Added in API level 5
int PROTOCOL_CUSTOM

常量值:-1(0xffffffff)

PROTOCOL_GOOGLE_TALK

Added in API level 5
int PROTOCOL_GOOGLE_TALK

常量值:5(0x00000005)

PROTOCOL_ICQ

Added in API level 5
int PROTOCOL_ICQ

常数值:6(0x00000006)

PROTOCOL_JABBER

Added in API level 5
int PROTOCOL_JABBER

常量值:7(0x00000007)

PROTOCOL_MSN

Added in API level 5
int PROTOCOL_MSN

常数值:1(0x00000001)

PROTOCOL_NETMEETING

Added in API level 5
int PROTOCOL_NETMEETING

常量值:8(0x00000008)

PROTOCOL_QQ

Added in API level 5
int PROTOCOL_QQ

常量值:4(0x00000004)

PROTOCOL_SKYPE

Added in API level 5
int PROTOCOL_SKYPE

常量值:3(0x00000003)

PROTOCOL_YAHOO

Added in API level 5
int PROTOCOL_YAHOO

常量值:2(0x00000002)

TYPE_HOME

Added in API level 5
int TYPE_HOME

常数值:1(0x00000001)

TYPE_OTHER

Added in API level 5
int TYPE_OTHER

常量值:3(0x00000003)

TYPE_WORK

Added in API level 5
int TYPE_WORK

常量值:2(0x00000002)

Public methods

getProtocolLabel

Added in API level 5
CharSequence getProtocolLabel (Resources res, 
                int type, 
                CharSequence label)

返回 CharSequence最能描述给定的协议,可能代给定 CUSTOM_PROTOCOL为值 PROTOCOL_CUSTOM

Parameters
res Resources
type int
label CharSequence
Returns
CharSequence

getProtocolLabelResource

Added in API level 5
int getProtocolLabelResource (int type)

返回最能描述给定PROTOCOL的字符串资源。 将始终返回有效的资源。

Parameters
type int
Returns
int

getTypeLabel

Added in API level 5
CharSequence getTypeLabel (Resources res, 
                int type, 
                CharSequence label)

返回一个 CharSequence最能描述给定的类型,可能取代定 LABEL的价值 TYPE_CUSTOM

Parameters
res Resources
type int
label CharSequence
Returns
CharSequence

getTypeLabelResource

Added in API level 5
int getTypeLabelResource (int type)

返回最能描述给定TYPE的字符串资源。 将始终返回有效的资源。

Parameters
type int
Returns
int

Hooray!