Added in API level 28

CarrierId


class CarrierId : BaseColumns
kotlin.Any
   ↳ android.provider.Telephony.CarrierId

Contains carrier identification information for the current subscriptions.

Summary

Constants
static String

A unique carrier id

static String

A user facing carrier name.

static String

A fine-grained carrier id.

static String

A user facing carrier name for specific carrier id SPECIFIC_CARRIER_ID.

Inherited constants
Public methods
static Uri

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

static Uri!
getUriForSubscriptionId(subscriptionId: Int)

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

Properties
static Uri!

The content:// style URI for this provider.

Constants

CARRIER_ID

Added in API level 28
static val CARRIER_ID: String

A unique carrier id

Value: "carrier_id"

CARRIER_NAME

Added in API level 28
static val CARRIER_NAME: String

A user facing carrier name.

Value: "carrier_name"

SPECIFIC_CARRIER_ID

Added in API level 29
static val SPECIFIC_CARRIER_ID: String

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().

Value: "specific_carrier_id"

SPECIFIC_CARRIER_ID_NAME

Added in API level 29
static val SPECIFIC_CARRIER_ID_NAME: String

A user facing carrier name for specific carrier id SPECIFIC_CARRIER_ID.

Value: "specific_carrier_id_name"

Public methods

getSpecificCarrierIdUriForSubscriptionId

Added in API level 29
static fun getSpecificCarrierIdUriForSubscriptionId(subscriptionId: Int): Uri

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
Return
Uri the Uri used to observe specific carrier identity changes This value cannot be null.

getUriForSubscriptionId

Added in API level 28
static fun getUriForSubscriptionId(subscriptionId: Int): Uri!

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 android.app.job.JobService to ensure your app is notified of changes to the Uri even when it is not running. Note, however, that using a android.app.job.JobService does not guarantee timely delivery of updates to the Uri.

Parameters
subscriptionId Int: the subscriptionId to receive updates on
Return
Uri! the Uri used to observe carrier identity changes

Properties

CONTENT_URI

Added in API level 28
static val CONTENT_URI: Uri!

The content:// style URI for this provider.