Udostępnij za pośrednictwem


SimPhonebookContract.SimRecords Class

Definition

Constants for the contact records on a SIM card.

[Android.Runtime.Register("android/provider/SimPhonebookContract$SimRecords", ApiSince=31, DoNotGenerateAcw=true)]
public sealed class SimPhonebookContract.SimRecords : Java.Lang.Object
[<Android.Runtime.Register("android/provider/SimPhonebookContract$SimRecords", ApiSince=31, DoNotGenerateAcw=true)>]
type SimPhonebookContract.SimRecords = class
    inherit Object
Inheritance
SimPhonebookContract.SimRecords
Attributes

Remarks

Constants for the contact records on a SIM card.

<h3 id="simrecords-data">Data</h3>

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 android.telephony.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).

<h3>Operations </h3> <dl> <dd><b>Insert</b></dd>

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 be thrown. The SimRecords#NAME column may be omitted but if provided and it violates any of the requirements discussed in the Data section above an IllegalArgumentException will be thrown.

If an insert is not possible because the elementary file is full then an IllegalStateException will be thrown.

<dd><b>Update</b></dd>

Updates can only be performed for individual records on ElementaryFiles#EF_ADN. A specific record is referenced via the Uri returned by SimRecords#getItemUri(int, int, int). Updates have the same constraints and behavior for the SimRecords#PHONE_NUMBER and SimRecords#NAME as insert. However, in the case of update the SimRecords#PHONE_NUMBER may be omitted as the existing record will already have a valid value.

<dd><b>Delete</b></dd>

Delete may only be performed for individual records on ElementaryFiles#EF_ADN. Deleting records will free up space for use by future inserts.

<dd><b>Query</b></dd>

All the records stored on a specific elementary file can be read via a Uri returned by SimRecords#getContentUri(int, int). This query always returns all records; there is no support for filtering via a selection. An individual record can be queried via a Uri returned by SimRecords#getItemUri(int, int, int). Queries will throw an IllegalArgumentException when the SIM with the subscription ID or the elementary file type are invalid or unavailable.

</dl>

Java documentation for android.provider.SimPhonebookContract.SimRecords.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Fields

ContentItemType

The MIME type of a CONTENT_URI subdirectory of a single SIM record.

ContentType

The MIME type of CONTENT_URI providing a directory of SIM records.

ElementaryFileType

The type of the elementary file the record is from.

ErrorNameUnsupported

Value returned from #getEncodedNameLength(ContentResolver, String) when the name length could not be determined because the name could not be encoded.

Name

The name for this record.

PhoneNumber

The phone number for this record.

RecordNumber

The 1-based offset of the record in the elementary file that contains it.

SubscriptionId

The subscription ID of the SIM the record is from.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetContentUri(Int32, Int32)

Returns the content Uri for the specified elementary file on the specified SIM.

GetEncodedNameLength(ContentResolver, String)

Returns the number of bytes required to encode the specified name when it is stored on the SIM.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetItemUri(Int32, Int32, Int32)

Content Uri for the specific SIM record with the provided #RECORD_NUMBER.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to