Build 1.0_r1(from source)

android.provider
Class Contacts.ContactMethods

java.lang.Object
  extended by android.provider.Contacts.ContactMethods
All Implemented Interfaces:
BaseColumns, Contacts.ContactMethodsColumns, Contacts.PeopleColumns
Enclosing class:
Contacts

public static final class Contacts.ContactMethods
extends Object
implements BaseColumns, Contacts.ContactMethodsColumns, Contacts.PeopleColumns

This table stores all non-phone contact methods and a reference to the person that the contact method belongs to.


Field Summary
static String CONTENT_EMAIL_ITEM_TYPE
          The MIME type of a CONTENT_URI sub-directory of a single Contacts.KIND_EMAIL entry.
static String CONTENT_EMAIL_TYPE
          The MIME type of a CONTENT_EMAIL_URI sub-directory of\ multiple Contacts.KIND_EMAIL entries.
static Uri CONTENT_EMAIL_URI
          The content:// style URL for sub-directory of e-mail addresses.
static String CONTENT_IM_ITEM_TYPE
          The MIME type of a CONTENT_URI sub-directory of a single Contacts.KIND_IM entry.
static String CONTENT_POSTAL_ITEM_TYPE
          The MIME type of a CONTENT_URI sub-directory of a single Contacts.KIND_POSTAL entry.
static String CONTENT_POSTAL_TYPE
          The MIME type of a CONTENT_EMAIL_URI sub-directory of\ multiple Contacts.KIND_POSTAL entries.
static String CONTENT_TYPE
          The MIME type of CONTENT_URI providing a directory of phones.
static Uri CONTENT_URI
          The content:// style URL for this table
static String DEFAULT_SORT_ORDER
          The default sort order for this table
static String PERSON_ID
          The ID of the person this contact method is assigned to.
static String POSTAL_LOCATION_LATITUDE
          The column with latitude data for postal locations
static String POSTAL_LOCATION_LONGITUDE
          The column with longitude data for postal locations
static int PROTOCOL_AIM
          The predefined IM protocol types.
static int PROTOCOL_GOOGLE_TALK
           
static int PROTOCOL_ICQ
           
static int PROTOCOL_JABBER
           
static int PROTOCOL_MSN
           
static int PROTOCOL_QQ
           
static int PROTOCOL_SKYPE
           
static int PROTOCOL_YAHOO
           
 
Fields inherited from interface android.provider.BaseColumns
_COUNT, _ID
 
Fields inherited from interface android.provider.Contacts.ContactMethodsColumns
AUX_DATA, DATA, ISPRIMARY, KIND, LABEL, TYPE, TYPE_CUSTOM, TYPE_HOME, TYPE_OTHER, TYPE_WORK
 
Fields inherited from interface android.provider.Contacts.PeopleColumns
CUSTOM_RINGTONE, DISPLAY_NAME, LAST_TIME_CONTACTED, NAME, NOTES, PHOTO_VERSION, SEND_TO_VOICEMAIL, STARRED, TIMES_CONTACTED
 
Method Summary
 void addPostalLocation(Context context, long postalId, double latitude, double longitude)
          Add a longitude and latitude location to a postal address.
static Object decodeImProtocol(String encodedString)
           
static String encodeCustomImProtocol(String protocolString)
           
static String encodePredefinedImProtocol(int protocol)
           
static CharSequence getDisplayLabel(Context context, int kind, int type, CharSequence label)
           
static String lookupProviderCategoryFromId(int protocol)
          This looks up the provider category defined in Im.ProviderCategories from the predefined IM protocol id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POSTAL_LOCATION_LATITUDE

public static final String POSTAL_LOCATION_LATITUDE
The column with latitude data for postal locations

Type: REAL

See Also:
Constant Field Values

POSTAL_LOCATION_LONGITUDE

public static final String POSTAL_LOCATION_LONGITUDE
The column with longitude data for postal locations

Type: REAL

See Also:
Constant Field Values

PROTOCOL_AIM

public static final int PROTOCOL_AIM
The predefined IM protocol types. The protocol can either be non-present, one of these types, or a free-form string. These cases are encoded in the AUX_DATA column as: - null - pre: - custom:

See Also:
Constant Field Values

PROTOCOL_MSN

public static final int PROTOCOL_MSN
See Also:
Constant Field Values

PROTOCOL_YAHOO

public static final int PROTOCOL_YAHOO
See Also:
Constant Field Values

PROTOCOL_SKYPE

public static final int PROTOCOL_SKYPE
See Also:
Constant Field Values

PROTOCOL_QQ

public static final int PROTOCOL_QQ
See Also:
Constant Field Values

PROTOCOL_GOOGLE_TALK

public static final int PROTOCOL_GOOGLE_TALK
See Also:
Constant Field Values

PROTOCOL_ICQ

public static final int PROTOCOL_ICQ
See Also:
Constant Field Values

PROTOCOL_JABBER

public static final int PROTOCOL_JABBER
See Also:
Constant Field Values

CONTENT_URI

public static final Uri CONTENT_URI
The content:// style URL for this table


CONTENT_EMAIL_URI

public static final Uri CONTENT_EMAIL_URI
The content:// style URL for sub-directory of e-mail addresses.


CONTENT_TYPE

public static final String CONTENT_TYPE
The MIME type of CONTENT_URI providing a directory of phones.

See Also:
Constant Field Values

CONTENT_EMAIL_TYPE

public static final String CONTENT_EMAIL_TYPE
The MIME type of a CONTENT_EMAIL_URI sub-directory of\ multiple Contacts.KIND_EMAIL entries.

See Also:
Constant Field Values

CONTENT_POSTAL_TYPE

public static final String CONTENT_POSTAL_TYPE
The MIME type of a CONTENT_EMAIL_URI sub-directory of\ multiple Contacts.KIND_POSTAL entries.

See Also:
Constant Field Values

CONTENT_EMAIL_ITEM_TYPE

public static final String CONTENT_EMAIL_ITEM_TYPE
The MIME type of a CONTENT_URI sub-directory of a single Contacts.KIND_EMAIL entry.

See Also:
Constant Field Values

CONTENT_POSTAL_ITEM_TYPE

public static final String CONTENT_POSTAL_ITEM_TYPE
The MIME type of a CONTENT_URI sub-directory of a single Contacts.KIND_POSTAL entry.

See Also:
Constant Field Values

CONTENT_IM_ITEM_TYPE

public static final String CONTENT_IM_ITEM_TYPE
The MIME type of a CONTENT_URI sub-directory of a single Contacts.KIND_IM entry.

See Also:
Constant Field Values

DEFAULT_SORT_ORDER

public static final String DEFAULT_SORT_ORDER
The default sort order for this table

See Also:
Constant Field Values

PERSON_ID

public static final String PERSON_ID
The ID of the person this contact method is assigned to.

Type: INTEGER (long)

See Also:
Constant Field Values
Method Detail

encodePredefinedImProtocol

public static String encodePredefinedImProtocol(int protocol)

encodeCustomImProtocol

public static String encodeCustomImProtocol(String protocolString)

decodeImProtocol

public static Object decodeImProtocol(String encodedString)

lookupProviderCategoryFromId

public static String lookupProviderCategoryFromId(int protocol)
This looks up the provider category defined in Im.ProviderCategories from the predefined IM protocol id. This is used for interacting with the IM application.

Parameters:
protocol - the protocol ID
Returns:
the provider category the IM app uses for the given protocol, or null if no provider is defined for the given protocol

getDisplayLabel

public static final CharSequence getDisplayLabel(Context context,
                                                 int kind,
                                                 int type,
                                                 CharSequence label)

addPostalLocation

public void addPostalLocation(Context context,
                              long postalId,
                              double latitude,
                              double longitude)
Add a longitude and latitude location to a postal address.

Parameters:
context - the context to use when updating the database
postalId - the address to update
latitude - the latitude for the address
longitude - the longitude for the address

Build 1.0_r1(from source)

Please submit a feedback, bug or feature