# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Inherited Constants | Fields | Methods | Inherited Methods

# ContactsContract.StatusUpdates

`public static class ContactsContract.StatusUpdates`
`extends Object` `implements ContactsContract.StatusColumns, ContactsContract.PresenceColumns`

java.lang.Object
↳ | android.provider.ContactsContract.StatusUpdates

Known direct subclasses ContactsContract.Presence
ContactsContract.Presence | This class is deprecated. This old name was never meant to be made public. Do not use.

A status update is linked to a `ContactsContract.Data` row and captures the user's latest status update via the corresponding source, e.g. "Having lunch" via "Google Talk".

There are two ways a status update can be inserted: by explicitly linking it to a Data row using `ContactsContract.PresenceColumns.DATA_ID` or indirectly linking it to a data row using a combination of `ContactsContract.PresenceColumns.PROTOCOL` (or `ContactsContract.PresenceColumns.CUSTOM_PROTOCOL`) and `ContactsContract.PresenceColumns.IM_HANDLE`. There is no difference between insert and update, you can use either.

Inserting or updating a status update for the user's profile requires either using the `ContactsContract.PresenceColumns.DATA_ID` to identify the data row to attach the update to, or `StatusUpdates#PROFILE_CONTENT_URI` to ensure that the change is scoped to the profile.

You cannot use `ContentResolver#update` to change a status, but `ContentResolver#insert` will replace the latests status if it already exists.

Use `ContentResolver#bulkInsert(Uri, ContentValues[])` to insert/update statuses for multiple contacts at once.

### Columns

StatusUpdates
long | `ContactsContract.PresenceColumns.DATA_ID` | read/write | Reference to the `Data#_ID` entry that owns this presence. If this field is not specified, the provider will attempt to find a data row that matches the `ContactsContract.PresenceColumns.PROTOCOL` (or `ContactsContract.PresenceColumns.CUSTOM_PROTOCOL`) and `ContactsContract.PresenceColumns.IM_HANDLE` columns.
long | `ContactsContract.PresenceColumns.PROTOCOL` | read/write | See `CommonDataKinds.Im` for a list of defined protocol constants.
String | `ContactsContract.PresenceColumns.CUSTOM_PROTOCOL` | read/write | Name of the custom protocol. Should be supplied along with the `ContactsContract.PresenceColumns.PROTOCOL` value `ContactsContract.CommonDataKinds.Im#PROTOCOL_CUSTOM`. Should be null or omitted if `ContactsContract.PresenceColumns.PROTOCOL` value is not `ContactsContract.CommonDataKinds.Im#PROTOCOL_CUSTOM`.
String | `ContactsContract.PresenceColumns.IM_HANDLE` | read/write | The IM handle the presence item is for. The handle is scoped to `ContactsContract.PresenceColumns.PROTOCOL`.
String | `ContactsContract.PresenceColumns.IM_ACCOUNT` | read/write | The IM account for the local user that the presence data came from.
int | `ContactsContract.StatusColumns.PRESENCE` | read/write | Contact IM presence status. The allowed values are: `ContactsContract.StatusColumns.OFFLINE` `ContactsContract.StatusColumns.INVISIBLE` `ContactsContract.StatusColumns.AWAY` `ContactsContract.StatusColumns.IDLE` `ContactsContract.StatusColumns.DO_NOT_DISTURB` `ContactsContract.StatusColumns.AVAILABLE` Since presence status is inherently volatile, the content provider may choose not to store this field in long-term storage.
int | `ContactsContract.StatusColumns.CHAT_CAPABILITY` | read/write | Contact IM chat compatibility value. The allowed values combinations of the following flags. If None of these flags is set, the device can only do text messaging. `ContactsContract.StatusColumns.CAPABILITY_HAS_VIDEO` `ContactsContract.StatusColumns.CAPABILITY_HAS_VOICE` `ContactsContract.StatusColumns.CAPABILITY_HAS_CAMERA` Since chat compatibility is inherently volatile as the contact's availability moves from one device to another, the content provider may choose not to store this field in long-term storage.
String | `ContactsContract.StatusColumns.STATUS` | read/write | Contact's latest status update, e.g. "having toast for breakfast"
long | `ContactsContract.StatusColumns.STATUS_TIMESTAMP` | read/write | The absolute time in milliseconds when the status was entered by the user. If this value is not provided, the provider will follow this logic: if there was no prior status update, the value will be left as null. If there was a prior status update, the provider will default this field to the current time.
String | `ContactsContract.StatusColumns.STATUS_RES_PACKAGE` | read/write | The package containing resources for this status: label and icon.
long | `ContactsContract.StatusColumns.STATUS_LABEL` | read/write | The resource ID of the label describing the source of contact status, e.g. "Google Talk". This resource is scoped by the `ContactsContract.StatusColumns.STATUS_RES_PACKAGE`.
long | `ContactsContract.StatusColumns.STATUS_ICON` | read/write | The resource ID of the icon for the source of contact status. This resource is scoped by the `ContactsContract.StatusColumns.STATUS_RES_PACKAGE`.

## Summary

### Constants
`String` | `CONTENT_ITEM_TYPE` The MIME type of a `CONTENT_URI` subdirectory of a single status update detail.
`String` | `CONTENT_TYPE` The MIME type of `CONTENT_URI` providing a directory of status update details.

### Inherited constants
From interface `android.provider.ContactsContract.StatusColumns`
`int` | `AVAILABLE` An allowed value of `PRESENCE`.
`int` | `AWAY` An allowed value of `PRESENCE`.
`int` | `CAPABILITY_HAS_CAMERA` An allowed flag of `CHAT_CAPABILITY`.
`int` | `CAPABILITY_HAS_VIDEO` An allowed flag of `CHAT_CAPABILITY`.
`int` | `CAPABILITY_HAS_VOICE` An allowed flag of `CHAT_CAPABILITY`.
`String` | `CHAT_CAPABILITY` Contact's audio/video chat capability level.
`int` | `DO_NOT_DISTURB` An allowed value of `PRESENCE`.
`int` | `IDLE` An allowed value of `PRESENCE`.
`int` | `INVISIBLE` An allowed value of `PRESENCE`.
`int` | `OFFLINE` An allowed value of `PRESENCE`.
`String` | `PRESENCE` Contact's latest presence level.
`String` | `PRESENCE_CUSTOM_STATUS` This constant is deprecated. use `STATUS`
`String` | `PRESENCE_STATUS` This constant is deprecated. use `PRESENCE`
`String` | `STATUS` Contact latest status update.
`String` | `STATUS_ICON` The resource ID of the icon for the source of the status update.
`String` | `STATUS_LABEL` The resource ID of the label describing the source of the status update, e.g. "Google Talk".
`String` | `STATUS_RES_PACKAGE` The package containing resources for this status: label and icon.
`String` | `STATUS_TIMESTAMP` The absolute time in milliseconds when the latest status was inserted/updated.
From interface `android.provider.ContactsContract.PresenceColumns`
`String` | `CUSTOM_PROTOCOL` Name of the custom protocol.
`String` | `DATA_ID` Reference to the `Data#_ID` entry that owns this presence.
`String` | `IM_ACCOUNT` The IM account for the local user that the presence data came from.
`String` | `IM_HANDLE` The IM handle the presence item is for.
`String` | `PROTOCOL` See `CommonDataKinds.Im` for a list of defined protocol constants.

### Fields
`public static final Uri` | `CONTENT_URI` The content:// style URI for this table
`public static final Uri` | `PROFILE_CONTENT_URI` The content:// style URI for this table, specific to the user's profile.

### Public methods
`static final int` | `getPresenceIconResourceId(int status)` Gets the resource ID for the proper presence icon.
`static final int` | `getPresencePrecedence(int status)` Returns the precedence of the status code the higher number being the higher precedence.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### CONTENT_ITEM_TYPE

    public static final String CONTENT_ITEM_TYPE

The MIME type of a `CONTENT_URI` subdirectory of a single status update detail.

Constant Value: "vnd.android.cursor.item/status-update"

### CONTENT_TYPE

    public static final String CONTENT_TYPE

The MIME type of `CONTENT_URI` providing a directory of status update details.

Constant Value: "vnd.android.cursor.dir/status-update"

## Fields

### CONTENT_URI

    public static final Uri CONTENT_URI

The content:// style URI for this table

### PROFILE_CONTENT_URI

    public static final Uri PROFILE_CONTENT_URI

The content:// style URI for this table, specific to the user's profile.

## Public methods

### getPresenceIconResourceId

    public static final int getPresenceIconResourceId (int status)

Gets the resource ID for the proper presence icon.

Parameters
`status` | `int`: the status to get the icon for

Returns
`int` | the resource ID for the proper presence icon

### getPresencePrecedence

    public static final int getPresencePrecedence (int status)

Returns the precedence of the status code the higher number being the higher precedence.

Parameters
`status` | `int`: The status code.

Returns
`int` | An integer representing the precedence, 0 being the lowest.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*