SimPhonebookContract.SimRecords
public
static
final
class
SimPhonebookContract.SimRecords
extends Object
| java.lang.Object | |
| ↳ | android.provider.SimPhonebookContract.SimRecords |
Constants for the contact records on a SIM card.
Data
Data is stored in a specific elementary file on a specific SIM card and these are isolated
from each other. SIM cards are identified by their subscription ID. SIM cards may not support
all or even any of the elementary file types. A SIM will have constraints on
the values of the data that can be stored in each elementary file. The available SIMs,
their supported elementary file types and the constraints on the data can be discovered by
querying ElementaryFiles.CONTENT_URI. Each elementary file has a fixed capacity
for the number of records that may be stored. This can be determined from the value
of the ElementaryFiles.MAX_RECORDS column.
The SimRecords.PHONE_NUMBER column can only contain dialable characters and this
applies regardless of the SIM that is being used. See
PhoneNumberUtils.isDialable(char) for more details. Additionally
the phone number can contain at most ElementaryFiles.PHONE_NUMBER_MAX_LENGTH
characters. The SimRecords.NAME column can contain at most
ElementaryFiles.NAME_MAX_LENGTH bytes when it is encoded for storage on the SIM.
Encoding is done internally and so the name should be provided to these provider APIs as a
Java String but the number of bytes required to encode it for storage will vary depending on
the characters it contains. This length can be determined by calling
SimRecords.getEncodedNameLength(ContentResolver,String).
Operations
- Insert
Only ElementaryFiles.EF_ADN supports inserts. SimRecords.PHONE_NUMBER
is a required column. If the value provided for this column is missing, null, empty
or violates the requirements discussed in the Data
section above an IllegalArgumentException will