Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

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.

Inherited constants

Fields

public static final Uri CONTENT_URI

The content:// style URI for this provider.

Public methods

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"

Fields

CONTENT_URI

added in API level 28
public static final Uri CONTENT_URI

The content:// style URI for this provider.

Public methods

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