Telephony.CarrierId


public static final class Telephony.CarrierId
extends Object implements BaseColumns

java.lang.Object
   ↳ android.provider.Telephony.CarrierId


Contains carrier identification information for the current subscriptions.

Summary

Constants

String CARRIER_ID

A unique carrier id

String CARRIER_NAME

A user facing carrier name.

String SPECIFIC_CARRIER_ID

A fine-grained carrier id.

String SPECIFIC_CARRIER_ID_NAME

A user facing carrier name for specific carrier id SPECIFIC_CARRIER_ID.

Inherited constants

String _COUNT

The count of rows in a directory.

String _ID

The unique ID for a row.

Fields

public static final Uri CONTENT_URI

The content:// style URI for this provider.

Public methods

static Uri getSpecificCarrierIdUriForSubscriptionId(int subscriptionId)

Generates a content Uri used to receive updates on specific carrier identity change on the given subscriptionId returned by TelephonyManager.getSimSpecificCarrierId().

static Uri getUriForSubscriptionId(int subscriptionId)

Generates a content Uri used to receive updates on carrier identity change on the given subscriptionId

Use this Uri with a ContentObserver to be notified of changes to the carrier identity TelephonyManager.getSimCarrierId() while your app is running.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

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

void finalize()

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

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

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

final void notifyAll()

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

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

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

final void wait(long timeoutMillis)

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

final void wait()

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

Constants

CARRIER_ID

Added in API level 28
public static final String CARRIER_ID

A unique carrier id

See also:

Constant Value: "carrier_id"

CARRIER_NAME

Added in API level 28
public static final String CARRIER_NAME

A user facing carrier name.

See also:

Constant Value: "carrier_name"

SPECIFIC_CARRIER_ID

Added in API level 29
public static final String SPECIFIC_CARRIER_ID

A fine-grained carrier id. The specific carrier ID would be used for configuration purposes, but apps wishing to know about the carrier itself should use the regular carrier ID returned by TelephonyManager.getSimCarrierId().

Constant Value: "specific_carrier_id"

SPECIFIC_CARRIER_ID_NAME

Added in API level 29
public static final String SPECIFIC_CARRIER_ID_NAME

A user facing carrier name for specific carrier id SPECIFIC_CARRIER_ID.

Constant Value: "specific_carrier_id_name"

Fields

CONTENT_URI

Added in API level 28
public static final Uri CONTENT_URI

The content:// style URI for this provider.

Public methods

getSpecificCarrierIdUriForSubscriptionId

Added in API level 29
public static Uri getSpecificCarrierIdUriForSubscriptionId (int subscriptionId)

Generates a content Uri used to receive updates on specific carrier identity change on the given subscriptionId returned by TelephonyManager.getSimSpecificCarrierId().

Parameters
subscriptionId int: the subscriptionId to receive updates on

Returns
Uri the Uri used to observe specific carrier identity changes This value cannot be null.

getUriForSubscriptionId

Added in API level 28
public static Uri getUriForSubscriptionId (int subscriptionId)

Generates a content Uri used to receive updates on carrier identity change on the given subscriptionId

Use this Uri with a ContentObserver to be notified of changes to the carrier identity TelephonyManager.getSimCarrierId() while your app is running. You can also use a JobService to ensure your app is notified of changes to the Uri even when it is not running. Note, however, that using a JobService does not guarantee timely delivery of updates to the Uri.

Parameters
subscriptionId int: the subscriptionId to receive updates on

Returns
Uri the Uri used to observe carrier identity changes