# SimPhonebookContract.ElementaryFiles

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

# ElementaryFiles

*** ** * ** ***

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

```
class ElementaryFiles
```

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

Constants for metadata about the elementary files of the SIM cards in the phone.

### Operations

:   **Insert**
:   **Update**
:   **Delete**
:   **Query**

<br />

## Summary

|                                                                                                                                                                                                        Constants                                                                                                                                                                                                         ||
|----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CONTENT_ITEM_TYPE](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#CONTENT_ITEM_TYPE:kotlin.String) The MIME type of a CONTENT_URI subdirectory of a single ADN-like elementary file.                                                                                      |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CONTENT_TYPE](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#CONTENT_TYPE:kotlin.String) The MIME type of CONTENT_URI providing a directory of ADN-like elementary files.                                                                                                 |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [EF_ADN](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#EF_ADN:kotlin.Int) Type for accessing records in the "abbreviated dialing number" (ADN) elementary file on the SIM.                                                                                                |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [EF_FDN](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#EF_FDN:kotlin.Int) Type for accessing records in the "fixed dialing number" (FDN) elementary file on the SIM.                                                                                                      |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [EF_SDN](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#EF_SDN:kotlin.Int) Type for accessing records in the "service dialing number" (SDN) elementary file on the SIM.                                                                                                    |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [EF_TYPE](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#EF_TYPE:kotlin.String) The elementary file type for this row.                                                                                                                                                     |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [EF_UNKNOWN](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#EF_UNKNOWN:kotlin.Int) A value for an elementary file that is not recognized.                                                                                                                                  |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [MAX_RECORDS](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#MAX_RECORDS:kotlin.String) The maximum number of records supported by the elementary file.                                                                                                                    |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [NAME_MAX_LENGTH](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#NAME_MAX_LENGTH:kotlin.String) The maximum length supported for the name of a record in the elementary file.                                                                                              |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [PHONE_NUMBER_MAX_LENGTH](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#PHONE_NUMBER_MAX_LENGTH:kotlin.String) The maximum length supported for the phone number of a record in the elementary file.                                                                      |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [RECORD_COUNT](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#RECORD_COUNT:kotlin.String) Count of the number of records that are currently stored in the elementary file.                                                                                                 |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SLOT_INDEX](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#SLOT_INDEX:kotlin.String) [SubscriptionInfo.getSimSlotIndex()](https://developer.android.com/reference/kotlin/android/telephony/SubscriptionInfo.html#getSimSlotIndex())of the SIM for this row.               |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SUBSCRIPTION_ID](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#SUBSCRIPTION_ID:kotlin.String) [SubscriptionInfo.getSubscriptionId()](https://developer.android.com/reference/kotlin/android/telephony/SubscriptionInfo.html#getSubscriptionId())of the SIM for this row. |

|                                                                                                                                                                                                                                       Public methods                                                                                                                                                                                                                                       ||
|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#) | [getItemUri](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#getItemUri(kotlin.Int,%20kotlin.Int))`(`subscriptionId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `efType:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Returns a content uri for a specific elementary file. |

|                                                                                                                                                Properties                                                                                                                                                 ||
|-----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#) | [CONTENT_URI](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#CONTENT_URI:android.net.Uri) Content URI for the ADN-like elementary files available on the device. |

## Constants

### CONTENT_ITEM_TYPE

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

```
static val CONTENT_ITEM_TYPE: String
```

The MIME type of a CONTENT_URI subdirectory of a single ADN-like elementary file.  

    Value: "vnd.android.cursor.item/sim-elementary-file"

### CONTENT_TYPE

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

```
static val CONTENT_TYPE: String
```

The MIME type of CONTENT_URI providing a directory of ADN-like elementary files.  

    Value: "vnd.android.cursor.dir/sim-elementary-file"

### EF_ADN

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

```
static val EF_ADN: Int
```

Type for accessing records in the "abbreviated dialing number" (ADN) elementary file on the SIM.

ADN records are typically user created.  

    Value: 1

### EF_FDN

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

```
static val EF_FDN: Int
```

Type for accessing records in the "fixed dialing number" (FDN) elementary file on the SIM.

FDN numbers are the numbers that are allowed to dialed for outbound calls when FDN is enabled.

FDN records cannot be modified by applications. Hence, insert, update and delete methods operating on this Uri will throw UnsupportedOperationException  

    Value: 2

### EF_SDN

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

```
static val EF_SDN: Int
```

Type for accessing records in the "service dialing number" (SDN) elementary file on the SIM.

Typically SDNs are preset numbers provided by the carrier for common operations (e.g. voicemail, check balance, etc).

SDN records cannot be modified by applications. Hence, insert, update and delete methods operating on this Uri will throw UnsupportedOperationException  

    Value: 3

### EF_TYPE

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

```
static val EF_TYPE: String
```

The elementary file type for this row.  

    Value: "ef_type"

**See Also**

- [android.provider.SimPhonebookContract.ElementaryFiles#EF_ADN](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#EF_ADN:kotlin.Int)
- [android.provider.SimPhonebookContract.ElementaryFiles#EF_FDN](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#EF_FDN:kotlin.Int)
- [android.provider.SimPhonebookContract.ElementaryFiles#EF_SDN](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#EF_SDN:kotlin.Int)  

### EF_UNKNOWN

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

```
static val EF_UNKNOWN: Int
```

A value for an elementary file that is not recognized.

Generally this should be ignored. If new values are added then this will be used for apps that target SDKs where they aren't defined.  

    Value: 0

### MAX_RECORDS

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

```
static val MAX_RECORDS: String
```

The maximum number of records supported by the elementary file.  

    Value: "max_records"

### NAME_MAX_LENGTH

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

```
static val NAME_MAX_LENGTH: String
```

The maximum length supported for the name of a record in the elementary file.  

    Value: "name_max_length"

### PHONE_NUMBER_MAX_LENGTH

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

```
static val PHONE_NUMBER_MAX_LENGTH: String
```

The maximum length supported for the phone number of a record in the elementary file.  

    Value: "phone_number_max_length"

### RECORD_COUNT

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

```
static val RECORD_COUNT: String
```

Count of the number of records that are currently stored in the elementary file.  

    Value: "record_count"

### SLOT_INDEX

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

```
static val SLOT_INDEX: String
```

[SubscriptionInfo.getSimSlotIndex()](https://developer.android.com/reference/kotlin/android/telephony/SubscriptionInfo.html#getSimSlotIndex())of the SIM for this row.  

    Value: "slot_index"

### SUBSCRIPTION_ID

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

```
static val SUBSCRIPTION_ID: String
```

[SubscriptionInfo.getSubscriptionId()](https://developer.android.com/reference/kotlin/android/telephony/SubscriptionInfo.html#getSubscriptionId())of the SIM for this row.  

    Value: "subscription_id"

## Public methods

### getItemUri

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

```
static fun getItemUri(
    subscriptionId: Int, 
    efType: Int
): Uri
```

Returns a content uri for a specific elementary file.

If a SIM with the specified subscriptionId is not present an exception will be thrown. If the SIM doesn't support the specified elementary file it will return an empty cursor.

|                                                                                                                                                                                                                                                                                                                                                                                                                             Parameters                                                                                                                                                                                                                                                                                                                                                                                                                              ||
|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `efType` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Value is[android.provider.SimPhonebookContract.ElementaryFiles#EF_UNKNOWN](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#EF_UNKNOWN:kotlin.Int),[android.provider.SimPhonebookContract.ElementaryFiles#EF_ADN](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#EF_ADN:kotlin.Int),[android.provider.SimPhonebookContract.ElementaryFiles#EF_FDN](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#EF_FDN:kotlin.Int), or[android.provider.SimPhonebookContract.ElementaryFiles#EF_SDN](https://developer.android.com/reference/kotlin/android/provider/SimPhonebookContract.ElementaryFiles#EF_SDN:kotlin.Int) |

|                                                  Return                                                  ||
|-----------------------------------------------------------------------------|-----------------------------|
| [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#) | This value cannot be`null`. |

## Properties

### CONTENT_URI

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

```
static val CONTENT_URI: Uri
```

Content URI for the ADN-like elementary files available on the device.