Added in API level 31

ElementaryFiles


class ElementaryFiles
kotlin.Any
   ↳ android.provider.SimPhonebookContract.ElementaryFiles

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

Operations

Insert

Insert is not supported for the Uris defined in this class.

Update

Update is not supported for the Uris defined in this class.

Delete

Delete is not supported for the Uris defined in this class.

Query

The elementary files for all the inserted SIMs can be read via ElementaryFiles#CONTENT_URI. Unsupported elementary files are omitted from the results. This Uri always returns all supported elementary files for all available SIMs; it does not support filtering via a selection. A specific elementary file can be queried via a Uri returned by ElementaryFiles#getItemUri(int, int). If the elementary file referenced by this Uri is unsupported by the SIM then the query will return an empty cursor.

Summary

Constants
static String

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

static String

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

static Int

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

static Int

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

static Int

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

static String

The elementary file type for this row.

static Int

A value for an elementary file that is not recognized.

static String

The maximum number of records supported by the elementary file.

static String

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

static String

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

static String

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

static String

SubscriptionInfo#getSimSlotIndex() of the SIM for this row.

static String

SubscriptionInfo#getSubscriptionId() of the SIM for this row.

Public methods
static Uri
getItemUri(subscriptionId: Int, efType: Int)

Returns a content uri for a specific elementary file.

Properties
static Uri

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

Constants

CONTENT_ITEM_TYPE

Added in API level 31
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
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
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
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
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_UNKNOWN

Added in API level 31
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
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
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
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
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
static val SLOT_INDEX: String

SubscriptionInfo#getSimSlotIndex() of the SIM for this row.

Value: "slot_index"

SUBSCRIPTION_ID

Added in API level 31
static val SUBSCRIPTION_ID: String

SubscriptionInfo#getSubscriptionId() of the SIM for this row.

Value: "subscription_id"

Public methods

getItemUri

Added in API level 31
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: Value is android.provider.SimPhonebookContract.ElementaryFiles#EF_UNKNOWN, android.provider.SimPhonebookContract.ElementaryFiles#EF_ADN, android.provider.SimPhonebookContract.ElementaryFiles#EF_FDN, or android.provider.SimPhonebookContract.ElementaryFiles#EF_SDN
Return
Uri This value cannot be null.

Properties

CONTENT_URI

Added in API level 31
static val CONTENT_URI: Uri

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