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

# Telephony.ServiceStateTable

*** ** * ** ***

` public static final class Telephony.ServiceStateTable `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

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

<br />

*** ** * ** ***

Constants for interfacing with the ServiceStateProvider and the different fields of the `https://developer.android.com/reference/android/telephony/ServiceState` class accessible through the provider.

## Summary

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.ServiceStateTable#AUTHORITY` The authority string for the ServiceStateProvider |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.ServiceStateTable#DATA_NETWORK_TYPE` The current data network type. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.ServiceStateTable#DATA_REG_STATE` An integer value indicating the current data service state. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.ServiceStateTable#DUPLEX_MODE` An integer value indicating the current duplex mode if the radio technology is LTE, LTE-CA or NR. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.ServiceStateTable#IS_MANUAL_NETWORK_SELECTION` The current network selection mode. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.ServiceStateTable#VOICE_OPERATOR_NUMERIC` The current registered operator numeric id. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.ServiceStateTable#VOICE_REG_STATE` An integer value indicating the current voice service state. |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/net/Uri` | `https://developer.android.com/reference/android/provider/Telephony.ServiceStateTable#CONTENT_URI` The `content://` style URL for the ServiceStateProvider |

| ### Public methods ||
|---|---|
| ` static https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/provider/Telephony.ServiceStateTable#getUriForSubscriptionId(int)(int subscriptionId) ` Generates a content `https://developer.android.com/reference/android/net/Uri` used to receive updates on every field in the ServiceState provider. |
| ` static https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/provider/Telephony.ServiceStateTable#getUriForSubscriptionIdAndField(int,%20java.lang.String)(int subscriptionId, https://developer.android.com/reference/java/lang/String field) ` Generates a content `https://developer.android.com/reference/android/net/Uri` used to receive updates on a specific field in the ServiceState provider. |

### 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

### AUTHORITY

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

```
public static final String AUTHORITY
```

The authority string for the ServiceStateProvider

<br />

Constant Value: "service-state"

### DATA_NETWORK_TYPE

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

```
public static final String DATA_NETWORK_TYPE
```

The current data network type.

This is the same as `https://developer.android.com/reference/android/telephony/TelephonyManager#getDataNetworkType()`.

<br />

Constant Value: "data_network_type"

### DATA_REG_STATE

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

```
public static final String DATA_REG_STATE
```

An integer value indicating the current data service state.

Valid values: `https://developer.android.com/reference/android/telephony/ServiceState#STATE_IN_SERVICE`, `https://developer.android.com/reference/android/telephony/ServiceState#STATE_OUT_OF_SERVICE`, `https://developer.android.com/reference/android/telephony/ServiceState#STATE_EMERGENCY_ONLY`, `https://developer.android.com/reference/android/telephony/ServiceState#STATE_POWER_OFF`.

<br />

Constant Value: "data_reg_state"

### DUPLEX_MODE

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

```
public static final String DUPLEX_MODE
```

An integer value indicating the current duplex mode if the radio technology is LTE, LTE-CA or NR.

Valid values: `https://developer.android.com/reference/android/telephony/ServiceState#DUPLEX_MODE_UNKNOWN`, `https://developer.android.com/reference/android/telephony/ServiceState#DUPLEX_MODE_FDD`, `https://developer.android.com/reference/android/telephony/ServiceState#DUPLEX_MODE_TDD`.

This is the same as `https://developer.android.com/reference/android/telephony/ServiceState#getDuplexMode()`.

<br />

Constant Value: "duplex_mode"

### IS_MANUAL_NETWORK_SELECTION

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

```
public static final String IS_MANUAL_NETWORK_SELECTION
```

The current network selection mode.

This is the same as `https://developer.android.com/reference/android/telephony/ServiceState#getIsManualSelection()`.

<br />

Constant Value: "is_manual_network_selection"

### VOICE_OPERATOR_NUMERIC

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

```
public static final String VOICE_OPERATOR_NUMERIC
```

The current registered operator numeric id.

In GSM/UMTS, numeric format is 3 digit country code plus 2 or 3 digit network code.

This is the same as `https://developer.android.com/reference/android/telephony/ServiceState#getOperatorNumeric()`.

<br />

Constant Value: "voice_operator_numeric"

### VOICE_REG_STATE

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

```
public static final String VOICE_REG_STATE
```

An integer value indicating the current voice service state.

Valid values: `https://developer.android.com/reference/android/telephony/ServiceState#STATE_IN_SERVICE`, `https://developer.android.com/reference/android/telephony/ServiceState#STATE_OUT_OF_SERVICE`, `https://developer.android.com/reference/android/telephony/ServiceState#STATE_EMERGENCY_ONLY`, `https://developer.android.com/reference/android/telephony/ServiceState#STATE_POWER_OFF`.

This is the same as `https://developer.android.com/reference/android/telephony/ServiceState#getState()`.

<br />

Constant Value: "voice_reg_state"

## Fields

### CONTENT_URI

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

```
public static final Uri CONTENT_URI
```

The `content://` style URL for the ServiceStateProvider

<br />

## Public methods

### getUriForSubscriptionId

Added in [API level 26](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 every field in the ServiceState provider.

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 `https://developer.android.com/reference/android/telephony/ServiceState` 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 `https://developer.android.com/reference/android/telephony/ServiceState` changes <br /> |

### getUriForSubscriptionIdAndField

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

```
public static Uri getUriForSubscriptionIdAndField (int subscriptionId, 
                String field)
```

Generates a content `https://developer.android.com/reference/android/net/Uri` used to receive updates on a specific field in the ServiceState provider.

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 `https://developer.android.com/reference/android/telephony/ServiceState` 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 /> |
| `field` | `String`: the ServiceState field to receive updates on <br /> |

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