Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#constants) \| [Inherited Constants](https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#inhconstants) \| [Fields](https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#lfields) \| [Methods](https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#inhmethods)

# ContactsContract.StatusUpdates

*** ** * ** ***

` public static class ContactsContract.StatusUpdates `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns, https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.ContactsContract.StatusUpdates |

Known direct subclasses [ContactsContract.Presence](https://developer.android.com/reference/android/provider/ContactsContract.Presence) [ContactsContract.Presence](https://developer.android.com/reference/android/provider/ContactsContract.Presence) *This class was deprecated in API level 5. This old name was never meant to be made public. Do not use.*   

*** ** * ** ***

<br />

A status update is linked to a `https://developer.android.com/reference/android/provider/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 `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#DATA_ID` or indirectly linking it to a data row using a combination of `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#PROTOCOL` (or `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#CUSTOM_PROTOCOL`) and `https://developer.android.com/reference/android/provider/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 `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#DATA_ID` to identify the data row to attach the update to, or `https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#PROFILE_CONTENT_URI` to ensure that the change is scoped to the profile.

You cannot use `https://developer.android.com/reference/android/content/ContentResolver#update(android.net.Uri,%20android.content.ContentValues,%20android.os.Bundle)` to change a status, but `https://developer.android.com/reference/android/content/ContentResolver#insert(android.net.Uri,%20android.content.ContentValues)` will replace the latests status if it already exists.

Use `https://developer.android.com/reference/android/content/ContentResolver#bulkInsert(android.net.Uri,%20android.content.ContentValues[])` to insert/update statuses for multiple contacts at once.

### Columns

| StatusUpdates ||||
|---|---|---|---|
| long | `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#DATA_ID` | read/write | Reference to the `https://developer.android.com/reference/android/provider/BaseColumns#_ID` entry that owns this presence. If this field is *not* specified, the provider will attempt to find a data row that matches the `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#PROTOCOL` (or `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#CUSTOM_PROTOCOL`) and `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#IM_HANDLE` columns. |
| long | `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#PROTOCOL` | read/write | See `https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.Im` for a list of defined protocol constants. |
| String | `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#CUSTOM_PROTOCOL` | read/write | Name of the custom protocol. Should be supplied along with the `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#PROTOCOL` value `https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.Im#PROTOCOL_CUSTOM`. Should be null or omitted if `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#PROTOCOL` value is not `https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.Im#PROTOCOL_CUSTOM`. |
| String | `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#IM_HANDLE` | read/write | The IM handle the presence item is for. The handle is scoped to `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#PROTOCOL`. |
| String | `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#IM_ACCOUNT` | read/write | The IM account for the local user that the presence data came from. |
| int | `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#PRESENCE` | read/write | Contact IM presence status. The allowed values are: <br /> - `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#OFFLINE` - `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#INVISIBLE` - `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#AWAY` - `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#IDLE` - `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#DO_NOT_DISTURB` - `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#AVAILABLE` <br /> Since presence status is inherently volatile, the content provider may choose not to store this field in long-term storage. |
| int | `https://developer.android.com/reference/android/provider/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. <br /> - `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#CAPABILITY_HAS_VIDEO` - `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#CAPABILITY_HAS_VOICE` - `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#CAPABILITY_HAS_CAMERA` <br /> 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 | `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#STATUS` | read/write | Contact's latest status update, e.g. "having toast for breakfast" |
| long | `https://developer.android.com/reference/android/provider/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 | `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#STATUS_RES_PACKAGE` | read/write | The package containing resources for this status: label and icon. |
| long | `https://developer.android.com/reference/android/provider/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 `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#STATUS_RES_PACKAGE`. |
| long | `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#STATUS_ICON` | read/write | The resource ID of the icon for the source of contact status. This resource is scoped by the `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#STATUS_RES_PACKAGE`. |

<br />

## Summary

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#CONTENT_ITEM_TYPE` The MIME type of a `https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#CONTENT_URI` subdirectory of a single status update detail. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#CONTENT_TYPE` The MIME type of `https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#CONTENT_URI` providing a directory of status update details. |

### Inherited constants

From interface `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns` `https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#CUSTOM_PROTOCOL`

Name of the custom protocol.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#DATA_ID`

Reference to the `https://developer.android.com/reference/android/provider/BaseColumns#_ID` entry that owns this presence.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#IM_ACCOUNT`

The IM account for the local user that the presence data came from.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#IM_HANDLE`

The IM handle the presence item is for.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.PresenceColumns#PROTOCOL`

See `https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.Im` for a list of defined protocol constants.
From interface `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns` `int` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#AVAILABLE`

An allowed value of `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#PRESENCE`.
`int` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#AWAY`

An allowed value of `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#PRESENCE`.
`int` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#CAPABILITY_HAS_CAMERA`

An allowed flag of `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#CHAT_CAPABILITY`.
`int` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#CAPABILITY_HAS_VIDEO`

An allowed flag of `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#CHAT_CAPABILITY`.
`int` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#CAPABILITY_HAS_VOICE`

An allowed flag of `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#CHAT_CAPABILITY`.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#CHAT_CAPABILITY`

Contact's audio/video chat capability level.
`int` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#DO_NOT_DISTURB`

An allowed value of `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#PRESENCE`.
`int` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#IDLE`

An allowed value of `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#PRESENCE`.
`int` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#INVISIBLE`

An allowed value of `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#PRESENCE`.
`int` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#OFFLINE`

An allowed value of `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#PRESENCE`.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#PRESENCE`

Contact's latest presence level.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#PRESENCE_CUSTOM_STATUS`

*This constant was deprecated in API level 15. use `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#STATUS`*
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#PRESENCE_STATUS`

*This constant was deprecated in API level 15. use `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#PRESENCE`*
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#STATUS`

Contact latest status update.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#STATUS_ICON`

The resource ID of the icon for the source of the status update.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#STATUS_LABEL`

The resource ID of the label describing the source of the status update, e.g. "Google Talk".
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#STATUS_RES_PACKAGE`

The package containing resources for this status: label and icon.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/ContactsContract.StatusColumns#STATUS_TIMESTAMP`

The absolute time in milliseconds when the latest status was inserted/updated.

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/net/Uri` | `https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#CONTENT_URI` The content:// style URI for this table |
| ` public static final https://developer.android.com/reference/android/net/Uri` | `https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#PROFILE_CONTENT_URI` The content:// style URI for this table, specific to the user's profile. |

| ### Public methods ||
|---|---|
| ` static final int` | ` https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#getPresenceIconResourceId(int)(int status) ` Gets the resource ID for the proper presence icon. |
| ` static final int` | ` https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#getPresencePrecedence(int)(int status) ` Returns the precedence of the status code the higher number being the higher precedence. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### CONTENT_ITEM_TYPE

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String CONTENT_ITEM_TYPE
```

The MIME type of a `https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#CONTENT_URI` subdirectory of a single status update detail.

<br />

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

### CONTENT_TYPE

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String CONTENT_TYPE
```

The MIME type of `https://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates#CONTENT_URI` providing a directory of status update details.

<br />

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

## Fields

### CONTENT_URI

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Uri CONTENT_URI
```

The content:// style URI for this table

<br />

### PROFILE_CONTENT_URI

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Uri PROFILE_CONTENT_URI
```

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

<br />

## Public methods

### getPresenceIconResourceId

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int getPresenceIconResourceId (int status)
```

Gets the resource ID for the proper presence icon.

<br />

| Parameters ||
|---|---|
| `status` | `int`: the status to get the icon for <br /> |

| Returns ||
|---|---|
| `int` | the resource ID for the proper presence icon <br /> |

### getPresencePrecedence

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int getPresencePrecedence (int status)
```

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

<br />

| Parameters ||
|---|---|
| `status` | `int`: The status code. <br /> |

| Returns ||
|---|---|
| `int` | An integer representing the precedence, 0 being the lowest. <br /> |