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

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

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