# Telephony.CarrierId

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

# CarrierId

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/provider/Telephony.CarrierId "View this page in Java")  

```
class CarrierId : BaseColumns
```

|---|------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                               ||
| ↳ | [android.provider.Telephony.CarrierId](https://developer.android.com/reference/kotlin/android/provider/Telephony.CarrierId#) |

Contains carrier identification information for the current subscriptions.

## Summary

|                                                                                                                                                                                                                   Constants                                                                                                                                                                                                                    ||
|----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CARRIER_ID](https://developer.android.com/reference/kotlin/android/provider/Telephony.CarrierId#CARRIER_ID:kotlin.String) A unique carrier id                                                                                                                                                                                                         |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CARRIER_NAME](https://developer.android.com/reference/kotlin/android/provider/Telephony.CarrierId#CARRIER_NAME:kotlin.String) A user facing carrier name.                                                                                                                                                                                             |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SPECIFIC_CARRIER_ID](https://developer.android.com/reference/kotlin/android/provider/Telephony.CarrierId#SPECIFIC_CARRIER_ID:kotlin.String) A fine-grained carrier id.                                                                                                                                                                                |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SPECIFIC_CARRIER_ID_NAME](https://developer.android.com/reference/kotlin/android/provider/Telephony.CarrierId#SPECIFIC_CARRIER_ID_NAME:kotlin.String) A user facing carrier name for specific carrier id[SPECIFIC_CARRIER_ID](https://developer.android.com/reference/kotlin/android/provider/Telephony.CarrierId#SPECIFIC_CARRIER_ID:kotlin.String). |

| Inherited constants ||
|---|---|
| From class[BaseColumns](https://developer.android.com/reference/kotlin/android/provider/BaseColumns) |----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [_COUNT](https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_COUNT:kotlin.String) <br /> The count of rows in a directory. Type: INTEGER <br /> | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [_ID](https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_ID:kotlin.String) <br /> The unique ID for a row. Type: INTEGER (long) <br />         | ||

|                                                                                                                                                                                                                                                                                                                                                               Public methods                                                                                                                                                                                                                                                                                                                                                                ||
|------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)  | [getSpecificCarrierIdUriForSubscriptionId](https://developer.android.com/reference/kotlin/android/provider/Telephony.CarrierId#getSpecificCarrierIdUriForSubscriptionId(kotlin.Int))`(`subscriptionId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Generates a content[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)used to receive updates on specific carrier identity change on the given subscriptionId returned by[TelephonyManager.getSimSpecificCarrierId()](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.html#getSimSpecificCarrierId()). |
| static[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)! | [getUriForSubscriptionId](https://developer.android.com/reference/kotlin/android/provider/Telephony.CarrierId#getUriForSubscriptionId(kotlin.Int))`(`subscriptionId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Generates a content[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)used to receive updates on carrier identity change on the given subscriptionId                                                                                                                                                                                                                       |

|                                                                                                                           Properties                                                                                                                           ||
|------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)! | [CONTENT_URI](https://developer.android.com/reference/kotlin/android/provider/Telephony.CarrierId#CONTENT_URI:android.net.Uri) The`content://`style URI for this provider. |

## Constants

### CARRIER_ID

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

```
static val CARRIER_ID: String
```

A unique carrier id  

    Value: "carrier_id"

**See Also**

- [android.telephony.TelephonyManager#getSimCarrierId()](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.html#getSimCarrierId())  

### CARRIER_NAME

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

```
static val CARRIER_NAME: String
```

A user facing carrier name.  

    Value: "carrier_name"

**See Also**

- [android.telephony.TelephonyManager#getSimCarrierIdName()](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.html#getSimCarrierIdName())  

### SPECIFIC_CARRIER_ID

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

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

    Value: "specific_carrier_id"

**See Also**

- [android.telephony.TelephonyManager#getSimSpecificCarrierId()](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.html#getSimSpecificCarrierId())  

### SPECIFIC_CARRIER_ID_NAME

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

```
static val SPECIFIC_CARRIER_ID_NAME: String
```

A user facing carrier name for specific carrier id[SPECIFIC_CARRIER_ID](https://developer.android.com/reference/kotlin/android/provider/Telephony.CarrierId#SPECIFIC_CARRIER_ID:kotlin.String).  

    Value: "specific_carrier_id_name"

**See Also**

- [android.telephony.TelephonyManager#getSimSpecificCarrierIdName()](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.html#getSimSpecificCarrierIdName())

## Public methods

### getSpecificCarrierIdUriForSubscriptionId

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

```
static fun getSpecificCarrierIdUriForSubscriptionId(subscriptionId: Int): Uri
```

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

|                                                              Parameters                                                               ||
|------------------|---------------------------------------------------------------------------------------------------------------------|
| `subscriptionId` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):the subscriptionId to receive updates on |

|                                                                               Return                                                                               ||
|-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------|
| [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#) | the Uri used to observe specific carrier identity changes This value cannot be`null`. |

**See Also**

- [android.telephony.TelephonyManager#ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.html#ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED:kotlin.String)  

### getUriForSubscriptionId

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

```
static fun getUriForSubscriptionId(subscriptionId: Int): Uri!
```

Generates a content[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)used to receive updates on carrier identity change on the given subscriptionId

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

|                                                              Parameters                                                               ||
|------------------|---------------------------------------------------------------------------------------------------------------------|
| `subscriptionId` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):the subscriptionId to receive updates on |

|                                                             Return                                                             ||
|------------------------------------------------------------------------------|--------------------------------------------------|
| [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)! | the Uri used to observe carrier identity changes |

## Properties

### CONTENT_URI

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

```
static val CONTENT_URI: Uri!
```

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