# VoicemailContract.Voicemails

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

# VoicemailContract.Voicemails

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/provider/VoicemailContract.Voicemails "View this page in Kotlin")\|Java

`
public
static
final

class
VoicemailContract.Voicemails
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


implements

`[BaseColumns](https://developer.android.com/reference/android/provider/BaseColumns)`,

`[OpenableColumns](https://developer.android.com/reference/android/provider/OpenableColumns)`


`

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

<br />

*** ** * ** ***

Defines fields exposed through the /voicemail path of this content provider.

## Summary

|                                                                                                                                                                                                       ### Constants                                                                                                                                                                                                        ||
|--------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | [ARCHIVED](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#ARCHIVED) Flag to indicate the voicemail was marked as archived.                                                                                                                                                                                      |
| [String](https://developer.android.com/reference/java/lang/String) | [BACKED_UP](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#BACKED_UP) Flag to indicate the voicemail was backed up.                                                                                                                                                                                             |
| [String](https://developer.android.com/reference/java/lang/String) | [DATE](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#DATE) The date the voicemail was sent, in milliseconds since the epoch Type: INTEGER (long) <br />                                                                                                                                                        |
| [String](https://developer.android.com/reference/java/lang/String) | [DELETED](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#DELETED) Flag used to indicate that the voicemail was deleted but not synced to the server.                                                                                                                                                            |
| [String](https://developer.android.com/reference/java/lang/String) | [DIRTY](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#DIRTY) Flag used to indicate that local, unsynced changes are present.                                                                                                                                                                                   |
| `int`                                                              | [DIRTY_RETAIN](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#DIRTY_RETAIN) Value of[DIRTY](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#DIRTY)when updating to indicate that the value should not be updated during this operation.                                   |
| [String](https://developer.android.com/reference/java/lang/String) | [DIR_TYPE](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#DIR_TYPE) The MIME type for a collection of voicemails.                                                                                                                                                                                               |
| [String](https://developer.android.com/reference/java/lang/String) | [DURATION](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#DURATION) The duration of the voicemail in seconds.                                                                                                                                                                                                   |
| [String](https://developer.android.com/reference/java/lang/String) | [HAS_CONTENT](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#HAS_CONTENT) Whether the media content for this voicemail is available for consumption.                                                                                                                                                            |
| [String](https://developer.android.com/reference/java/lang/String) | [IS_OMTP_VOICEMAIL](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#IS_OMTP_VOICEMAIL) Flag to indicate the voicemail is a OMTP voicemail handled by the[VisualVoicemailService](https://developer.android.com/reference/android/telephony/VisualVoicemailService).                                              |
| [String](https://developer.android.com/reference/java/lang/String) | [IS_READ](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#IS_READ) Whether this item has been read or otherwise consumed by the user.                                                                                                                                                                            |
| [String](https://developer.android.com/reference/java/lang/String) | [ITEM_TYPE](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#ITEM_TYPE) The MIME type for a single voicemail.                                                                                                                                                                                                     |
| [String](https://developer.android.com/reference/java/lang/String) | [LAST_MODIFIED](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#LAST_MODIFIED) The date the row is last inserted, updated, or marked as deleted, in milliseconds since the epoch.                                                                                                                                |
| [String](https://developer.android.com/reference/java/lang/String) | [MIME_TYPE](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#MIME_TYPE) MIME type of the media content for the voicemail.                                                                                                                                                                                         |
| [String](https://developer.android.com/reference/java/lang/String) | [NEW](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#NEW) Whether or not the voicemail has been acknowledged (notification sent to the user).                                                                                                                                                                   |
| [String](https://developer.android.com/reference/java/lang/String) | [NUMBER](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#NUMBER) Phone number of the voicemail sender.                                                                                                                                                                                                           |
| [String](https://developer.android.com/reference/java/lang/String) | [PHONE_ACCOUNT_COMPONENT_NAME](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#PHONE_ACCOUNT_COMPONENT_NAME) The[ComponentName](https://developer.android.com/reference/android/content/ComponentName)of the[PhoneAccount](https://developer.android.com/reference/android/telecom/PhoneAccount)in string form.  |
| [String](https://developer.android.com/reference/java/lang/String) | [PHONE_ACCOUNT_ID](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#PHONE_ACCOUNT_ID) The identifier of a[PhoneAccount](https://developer.android.com/reference/android/telecom/PhoneAccount)that is unique to a specified[ComponentName](https://developer.android.com/reference/android/content/ComponentName). |
| [String](https://developer.android.com/reference/java/lang/String) | [RESTORED](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#RESTORED) Flag to indicate the voicemail was restored from a backup.                                                                                                                                                                                  |
| [String](https://developer.android.com/reference/java/lang/String) | [SOURCE_DATA](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#SOURCE_DATA) Application-specific data available to the source application that inserted the voicemail.                                                                                                                                            |
| [String](https://developer.android.com/reference/java/lang/String) | [SOURCE_PACKAGE](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#SOURCE_PACKAGE) Package name of the source application that inserted the voicemail.                                                                                                                                                             |
| [String](https://developer.android.com/reference/java/lang/String) | [TRANSCRIPTION](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#TRANSCRIPTION) The transcription of the voicemail entry.                                                                                                                                                                                         |

|                                                                                                                                                                                                                                                                                                                                                                                                 ### Inherited constants                                                                                                                                                                                                                                                                                                                                                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From interface[android.provider.BaseColumns](https://developer.android.com/reference/android/provider/BaseColumns) |--------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------| | [String](https://developer.android.com/reference/java/lang/String) | [_COUNT](https://developer.android.com/reference/android/provider/BaseColumns#_COUNT) The count of rows in a directory. | | [String](https://developer.android.com/reference/java/lang/String) | [_ID](https://developer.android.com/reference/android/provider/BaseColumns#_ID) The unique ID for a row.                |                                                                                                   |
| From interface[android.provider.OpenableColumns](https://developer.android.com/reference/android/provider/OpenableColumns) |--------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://developer.android.com/reference/java/lang/String) | [DISPLAY_NAME](https://developer.android.com/reference/android/provider/OpenableColumns#DISPLAY_NAME) The human-friendly name of file.                | | [String](https://developer.android.com/reference/java/lang/String) | [SIZE](https://developer.android.com/reference/android/provider/OpenableColumns#SIZE) The number of bytes in the file identified by the openable URI. | |

|                                                                                                                 ### Fields                                                                                                                 ||
|---------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| ` public static final `[Uri](https://developer.android.com/reference/android/net/Uri) | [CONTENT_URI](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#CONTENT_URI) URI to insert/retrieve voicemails. |

|                                                                                                                                                                                                                                                                           ### Public methods                                                                                                                                                                                                                                                                            ||
|--------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static `[Uri](https://developer.android.com/reference/android/net/Uri) | ` `[buildSourceUri](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#buildSourceUri(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` packageName) ` A convenience method to build voicemail URI specific to a source package by appending[VoicemailContract.PARAM_KEY_SOURCE_PACKAGE](https://developer.android.com/reference/android/provider/VoicemailContract#PARAM_KEY_SOURCE_PACKAGE)param to the base URI. |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](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 `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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

### ARCHIVED

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

```
public static final String ARCHIVED
```

Flag to indicate the voicemail was marked as archived. Archived voicemail should not be deleted even if it no longer exist on the server. The value will be 1 if archived true, 0 if not.

Type: INTEGER (boolean)

<br />

<br />

Constant Value: "archived"  

### BACKED_UP

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

```
public static final String BACKED_UP
```

Flag to indicate the voicemail was backed up. The value will be 1 if backed up, 0 if not.

Type: INTEGER (boolean)

<br />

<br />

Constant Value: "backed_up"  

### DATE

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

```
public static final String DATE
```

The date the voicemail was sent, in milliseconds since the epoch

Type: INTEGER (long)

<br />

<br />

Constant Value: "date"  

### DELETED

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

```
public static final String DELETED
```

Flag used to indicate that the voicemail was deleted but not synced to the server. A deleted row should be ignored. The value will be 1 if deleted is true, 0 if false.

Type: INTEGER (boolean)

<br />

<br />

Constant Value: "deleted"  

### DIRTY

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

```
public static final String DIRTY
```

Flag used to indicate that local, unsynced changes are present. Currently, this is used to indicate that the voicemail was read or deleted. The value will be 1 if dirty is true, 0 if false.

When a caller updates a voicemail row (either with[ContentResolver.update](https://developer.android.com/reference/android/content/ContentResolver#update(android.net.Uri,%20android.content.ContentValues,%20android.os.Bundle))or[ContentResolver.applyBatch](https://developer.android.com/reference/android/content/ContentResolver#applyBatch(java.lang.String,%20java.util.ArrayList<android.content.ContentProviderOperation>))), and if the[ContentValues](https://developer.android.com/reference/android/content/ContentValues)doesn't contain this column, the voicemail provider implicitly sets it to 0 if the calling package is the[SOURCE_PACKAGE](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#SOURCE_PACKAGE)or to 1 otherwise. To prevent this behavior, explicitly set[DIRTY_RETAIN](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#DIRTY_RETAIN)to DIRTY in the[ContentValues](https://developer.android.com/reference/android/content/ContentValues).

Type: INTEGER (boolean)

<br />

<br />

**See also:**

- [DIRTY_RETAIN](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#DIRTY_RETAIN)

Constant Value: "dirty"  

### DIRTY_RETAIN

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

```
public static final int DIRTY_RETAIN
```

Value of[DIRTY](https://developer.android.com/reference/android/provider/VoicemailContract.Voicemails#DIRTY)when updating to indicate that the value should not be updated during this operation.

<br />

Constant Value: -1 (0xffffffff)  

### DIR_TYPE

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

```
public static final String DIR_TYPE
```

The MIME type for a collection of voicemails.

<br />

Constant Value: "vnd.android.cursor.dir/voicemails"  

### DURATION

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

```
public static final String DURATION
```

The duration of the voicemail in seconds.

Type: INTEGER (long)

<br />

<br />

Constant Value: "duration"  

### HAS_CONTENT

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

```
public static final String HAS_CONTENT
```

Whether the media content for this voicemail is available for consumption.

Type: INTEGER (boolean)

<br />

<br />

Constant Value: "has_content"  

### IS_OMTP_VOICEMAIL

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

```
public static final String IS_OMTP_VOICEMAIL
```

Flag to indicate the voicemail is a OMTP voicemail handled by the[VisualVoicemailService](https://developer.android.com/reference/android/telephony/VisualVoicemailService). The UI should only show OMTP voicemails from the current visual voicemail package. For example, the selection could be`WHERE (IS_OMTP_VOICEMAIL == 0) OR ( IS_OMTP_VOICEMAIL == 1 AND SOURCE_PACKAGE ==
"current.vvm.package")`

Type: INTEGER (boolean)

<br />

<br />

**See also:**

- [TelephonyManager.getVisualVoicemailPackageName()](https://developer.android.com/reference/android/telephony/TelephonyManager#getVisualVoicemailPackageName())

Constant Value: "is_omtp_voicemail"  

### IS_READ

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

```
public static final String IS_READ
```

Whether this item has been read or otherwise consumed by the user.

Type: INTEGER (boolean)

<br />

<br />

Constant Value: "is_read"  

### ITEM_TYPE

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

```
public static final String ITEM_TYPE
```

The MIME type for a single voicemail.

<br />

Constant Value: "vnd.android.cursor.item/voicemail"  

### LAST_MODIFIED

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

```
public static final String LAST_MODIFIED
```

The date the row is last inserted, updated, or marked as deleted, in milliseconds since the epoch. Read only.

Type: INTEGER (long)

<br />

<br />

Constant Value: "last_modified"  

### MIME_TYPE

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

```
public static final String MIME_TYPE
```

MIME type of the media content for the voicemail.

Type: TEXT

<br />

<br />

Constant Value: "mime_type"  

### NEW

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

```
public static final String NEW
```

Whether or not the voicemail has been acknowledged (notification sent to the user).

Type: INTEGER (boolean)

<br />

<br />

Constant Value: "new"  

### NUMBER

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

```
public static final String NUMBER
```

Phone number of the voicemail sender.

Type: TEXT

<br />

<br />

Constant Value: "number"  

### PHONE_ACCOUNT_COMPONENT_NAME

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

```
public static final String PHONE_ACCOUNT_COMPONENT_NAME
```

The[ComponentName](https://developer.android.com/reference/android/content/ComponentName)of the[PhoneAccount](https://developer.android.com/reference/android/telecom/PhoneAccount)in string form. The[PhoneAccount](https://developer.android.com/reference/android/telecom/PhoneAccount)of the voicemail is used to differentiate voicemails from different sources.

Type: TEXT

<br />

<br />

Constant Value: "subscription_component_name"  

### PHONE_ACCOUNT_ID

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

```
public static final String PHONE_ACCOUNT_ID
```

The identifier of a[PhoneAccount](https://developer.android.com/reference/android/telecom/PhoneAccount)that is unique to a specified[ComponentName](https://developer.android.com/reference/android/content/ComponentName). The[PhoneAccount](https://developer.android.com/reference/android/telecom/PhoneAccount)of the voicemail is used to differentiate voicemails from different sources.

Type: TEXT

<br />

<br />

Constant Value: "subscription_id"  

### RESTORED

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

```
public static final String RESTORED
```

Flag to indicate the voicemail was restored from a backup. The value will be 1 if restored, 0 if not.

Type: INTEGER (boolean)

<br />

<br />

Constant Value: "restored"  

### SOURCE_DATA

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

```
public static final String SOURCE_DATA
```

Application-specific data available to the source application that inserted the voicemail. This is typically used to store the source specific message id to identify this voicemail on the remote voicemail server.

Type: TEXT

Note that this is NOT the voicemail media content data.

<br />

Constant Value: "source_data"  

### SOURCE_PACKAGE

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

```
public static final String SOURCE_PACKAGE
```

Package name of the source application that inserted the voicemail.

Type: TEXT

<br />

<br />

Constant Value: "source_package"  

### TRANSCRIPTION

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

```
public static final String TRANSCRIPTION
```

The transcription of the voicemail entry. This will only be populated if the voicemail entry has a valid transcription.

Type: TEXT

<br />

<br />

Constant Value: "transcription"

## Fields

### CONTENT_URI

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

```
public static final Uri CONTENT_URI
```

URI to insert/retrieve voicemails.

<br />

## Public methods

### buildSourceUri

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

```
public static Uri buildSourceUri (String packageName)
```

A convenience method to build voicemail URI specific to a source package by appending[VoicemailContract.PARAM_KEY_SOURCE_PACKAGE](https://developer.android.com/reference/android/provider/VoicemailContract#PARAM_KEY_SOURCE_PACKAGE)param to the base URI.

<br />

|           Parameters           ||
|---------------|-----------------|
| `packageName` | `String` <br /> |

|                                Returns                                 ||
|----------------------------------------------------------------|--------|
| [Uri](https://developer.android.com/reference/android/net/Uri) | <br /> |