Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/provider/Telephony.CarrierId#constants) \| [Inherited Constants](https://developer.android.com/reference/android/provider/Telephony.CarrierId#inhconstants) \| [Fields](https://developer.android.com/reference/android/provider/Telephony.CarrierId#lfields) \| [Methods](https://developer.android.com/reference/android/provider/Telephony.CarrierId#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/provider/Telephony.CarrierId#inhmethods)

# Telephony.CarrierId

*** ** * ** ***


`
public
static
final

class
Telephony.CarrierId
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/android/provider/BaseColumns


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.Telephony.CarrierId |

<br />

*** ** * ** ***

Contains carrier identification information for the current subscriptions.

## Summary

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.CarrierId#CARRIER_ID` A unique carrier id |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.CarrierId#CARRIER_NAME` A user facing carrier name. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.CarrierId#SPECIFIC_CARRIER_ID` A fine-grained carrier id. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.CarrierId#SPECIFIC_CARRIER_ID_NAME` A user facing carrier name for specific carrier id `https://developer.android.com/reference/android/provider/Telephony.CarrierId#SPECIFIC_CARRIER_ID`. |

| ### Inherited constants |
|---|
| From interface `https://developer.android.com/reference/android/provider/BaseColumns` |---|---| | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/BaseColumns#_COUNT` The count of rows in a directory. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/BaseColumns#_ID` The unique ID for a row. | |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/net/Uri` | `https://developer.android.com/reference/android/provider/Telephony.CarrierId#CONTENT_URI` The `content://` style URI for this provider. |

| ### Public methods ||
|---|---|
| ` static https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/provider/Telephony.CarrierId#getSpecificCarrierIdUriForSubscriptionId(int)(int subscriptionId) ` Generates a content `https://developer.android.com/reference/android/net/Uri` used to receive updates on specific carrier identity change on the given subscriptionId returned by `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSpecificCarrierId()`. |
| ` static https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/provider/Telephony.CarrierId#getUriForSubscriptionId(int)(int subscriptionId) ` Generates a content `https://developer.android.com/reference/android/net/Uri` used to receive updates on carrier identity change on the given subscriptionId Use this `https://developer.android.com/reference/android/net/Uri` with a `https://developer.android.com/reference/android/database/ContentObserver` to be notified of changes to the carrier identity `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()` while your app is running. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(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` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(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` | ` https://developer.android.com/reference/java/lang/Object#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](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String CARRIER_ID
```

A unique carrier id

<br />

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()`

Constant Value:

"carrier_id"


### CARRIER_NAME

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String CARRIER_NAME
```

A user facing carrier name.

<br />

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierIdName()`

Constant Value:

"carrier_name"


### SPECIFIC_CARRIER_ID

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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
`https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()`.

<br />

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSpecificCarrierId()`

Constant Value:

"specific_carrier_id"


### SPECIFIC_CARRIER_ID_NAME

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String SPECIFIC_CARRIER_ID_NAME
```

A user facing carrier name for specific carrier id `https://developer.android.com/reference/android/provider/Telephony.CarrierId#SPECIFIC_CARRIER_ID`.

<br />

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSpecificCarrierIdName()`

Constant Value:

"specific_carrier_id_name"


## Fields

### CONTENT_URI

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Uri CONTENT_URI
```

The `content://` style URI for this provider.

<br />

## Public methods

### getSpecificCarrierIdUriForSubscriptionId

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static Uri getSpecificCarrierIdUriForSubscriptionId (int subscriptionId)
```

Generates a content `https://developer.android.com/reference/android/net/Uri` used to receive updates on specific carrier identity
change on the given subscriptionId returned by
`https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSpecificCarrierId()`.

<br />

| Parameters ||
|---|---|
| `subscriptionId` | `int`: the subscriptionId to receive updates on <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/Uri` | the Uri used to observe specific carrier identity changes. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED`

  `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED`

### getUriForSubscriptionId

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static Uri getUriForSubscriptionId (int subscriptionId)
```

Generates a content `https://developer.android.com/reference/android/net/Uri` used to receive updates on carrier identity change
on the given subscriptionId


Use this `https://developer.android.com/reference/android/net/Uri` with a `https://developer.android.com/reference/android/database/ContentObserver` to be notified of changes to the
carrier identity `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()`
while your app is running. You can also use a `https://developer.android.com/reference/android/app/job/JobService`
to ensure your app
is notified of changes to the `https://developer.android.com/reference/android/net/Uri` even when it is not running.
Note, however, that using a `https://developer.android.com/reference/android/app/job/JobService` does not guarantee
timely delivery of updates to the `https://developer.android.com/reference/android/net/Uri`.

<br />

| Parameters ||
|---|---|
| `subscriptionId` | `int`: the subscriptionId to receive updates on <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/Uri` | the Uri used to observe carrier identity changes <br /> |