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

# Voicemails

*** ** * ** ***

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

```
class Voicemails : BaseColumns, OpenableColumns
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.provider.VoicemailContract.Voicemails](https://developer.android.com/reference/kotlin/android/provider/VoicemailContract.Voicemails#) |

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

## Summary

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

| Inherited constants ||
|---|---|
| From class `https://developer.android.com/reference/kotlin/android/provider/OpenableColumns` |---|---| | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/android/provider/OpenableColumns#DISPLAY_NAME:kotlin.String` The human-friendly name of file. If this is not provided then the name should default to the the last segment of the file's URI. <br /> | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/android/provider/OpenableColumns#SIZE:kotlin.String` The number of bytes in the file identified by the openable URI. Null if unknown. <br /> | ||
| From class `https://developer.android.com/reference/kotlin/android/provider/BaseColumns` |---|---| | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_COUNT:kotlin.String` The count of rows in a directory. Type: INTEGER <br /> | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_ID:kotlin.String` The unique ID for a row. Type: INTEGER (long) <br /> | ||

| Public methods ||
|---|---|
| static [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)! | `https://developer.android.com/reference/kotlin/android/provider/VoicemailContract.Voicemails#buildSourceUri(kotlin.String)(packageName: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!)` A convenience method to build voicemail URI specific to a source package by appending `https://developer.android.com/reference/kotlin/android/provider/VoicemailContract#PARAM_KEY_SOURCE_PACKAGE:kotlin.String` param to the base URI. |

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

## Constants

### ARCHIVED

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

```
static val ARCHIVED: String
```

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)

    Value: "archived"

### BACKED_UP

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

```
static val BACKED_UP: String
```

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

Type: INTEGER (boolean)

    Value: "backed_up"

### DATE

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

```
static val DATE: String
```

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

Type: INTEGER (long)

    Value: "date"

### DELETED

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

```
static val DELETED: String
```

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)

    Value: "deleted"

### DIRTY

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

```
static val DIRTY: String
```

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 android.content.ContentResolver#update or `https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#applyBatch(kotlin.String,%20java.util.ArrayList)`), and if the `https://developer.android.com/reference/kotlin/android/content/ContentValues.html#` doesn't contain this column, the voicemail provider implicitly sets it to 0 if the calling package is the `https://developer.android.com/reference/kotlin/android/provider/VoicemailContract.Voicemails#SOURCE_PACKAGE:kotlin.String` or to 1 otherwise. To prevent this behavior, explicitly set `https://developer.android.com/reference/kotlin/android/provider/VoicemailContract.Voicemails#DIRTY_RETAIN:kotlin.Int` to DIRTY in the `https://developer.android.com/reference/kotlin/android/content/ContentValues.html#`.

Type: INTEGER (boolean)

    Value: "dirty"

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/VoicemailContract.Voicemails#DIRTY_RETAIN:kotlin.Int`

### DIRTY_RETAIN

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

```
static val DIRTY_RETAIN: Int
```

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

    Value: -1

### DIR_TYPE

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

```
static val DIR_TYPE: String
```

The MIME type for a collection of voicemails.

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

### DURATION

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

```
static val DURATION: String
```

The duration of the voicemail in seconds.

Type: INTEGER (long)

    Value: "duration"

### HAS_CONTENT

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

```
static val HAS_CONTENT: String
```

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

Type: INTEGER (boolean)

    Value: "has_content"

### IS_OMTP_VOICEMAIL

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

```
static val IS_OMTP_VOICEMAIL: String
```

Flag to indicate the voicemail is a OMTP voicemail handled by the `https://developer.android.com/reference/kotlin/android/telephony/VisualVoicemailService.html#`. 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)

    Value: "is_omtp_voicemail"

**See Also**

- `https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.html#getVisualVoicemailPackageName()`

### IS_READ

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

```
static val IS_READ: String
```

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

Type: INTEGER (boolean)

    Value: "is_read"

### ITEM_TYPE

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

```
static val ITEM_TYPE: String
```

The MIME type for a single voicemail.

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

### LAST_MODIFIED

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

```
static val LAST_MODIFIED: String
```

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

Type: INTEGER (long)

    Value: "last_modified"

### MIME_TYPE

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

```
static val MIME_TYPE: String
```

MIME type of the media content for the voicemail.

Type: TEXT

    Value: "mime_type"

### NEW

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

```
static val NEW: String
```

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

Type: INTEGER (boolean)

    Value: "new"

### NUMBER

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

```
static val NUMBER: String
```

Phone number of the voicemail sender.

Type: TEXT

    Value: "number"

### PHONE_ACCOUNT_COMPONENT_NAME

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

```
static val PHONE_ACCOUNT_COMPONENT_NAME: String
```

The `https://developer.android.com/reference/kotlin/android/content/ComponentName.html#` of the `https://developer.android.com/reference/kotlin/android/telecom/PhoneAccount.html#` in string form. The `https://developer.android.com/reference/kotlin/android/telecom/PhoneAccount.html#` of the voicemail is used to differentiate voicemails from different sources.

Type: TEXT

    Value: "subscription_component_name"

### PHONE_ACCOUNT_ID

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

```
static val PHONE_ACCOUNT_ID: String
```

The identifier of a `https://developer.android.com/reference/kotlin/android/telecom/PhoneAccount.html#` that is unique to a specified `https://developer.android.com/reference/kotlin/android/content/ComponentName.html#`. The `https://developer.android.com/reference/kotlin/android/telecom/PhoneAccount.html#` of the voicemail is used to differentiate voicemails from different sources.

Type: TEXT

    Value: "subscription_id"

### RESTORED

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

```
static val RESTORED: String
```

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

Type: INTEGER (boolean)

    Value: "restored"

### SOURCE_DATA

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

```
static val SOURCE_DATA: String
```

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.

    Value: "source_data"

### SOURCE_PACKAGE

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

```
static val SOURCE_PACKAGE: String
```

Package name of the source application that inserted the voicemail.

Type: TEXT

    Value: "source_package"

### TRANSCRIPTION

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

```
static val TRANSCRIPTION: String
```

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

Type: TEXT

    Value: "transcription"

## Public methods

### buildSourceUri

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

```
static fun buildSourceUri(packageName: String!): Uri!
```

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

## Properties

### CONTENT_URI

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

```
static val CONTENT_URI: Uri!
```

URI to insert/retrieve voicemails.