Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

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 PRECISE_CARRIER_ID

A fine-grained carrier id.

String PRECISE_CARRIER_ID_NAME

A user facing carrier name for precise carrier id PRECISE_CARRIER_ID.

Inherited constants

Fields

public static final Uri CONTENT_URI

The content:// style URI for this provider.

Public methods

static Uri getPreciseCarrierIdUriForSubscriptionId(int subscriptionId)

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

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"

PRECISE_CARRIER_ID

public static final String PRECISE_CARRIER_ID

A fine-grained carrier id.

Constant Value: "precise_carrier_id"

PRECISE_CARRIER_ID_NAME

public static final String PRECISE_CARRIER_ID_NAME

A user facing carrier name for precise carrier id PRECISE_CARRIER_ID.

Constant Value: "precise_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

getPreciseCarrierIdUriForSubscriptionId

public static Uri getPreciseCarrierIdUriForSubscriptionId (int subscriptionId)

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

Parameters
subscriptionId int: the subscriptionId to receive updates on

Returns
Uri the Uri used to observe precise carrier identity changes

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