Telephony.ServiceStateTable


public static final class Telephony.ServiceStateTable
extends Object

java.lang.Object
   ↳ android.provider.Telephony.ServiceStateTable


Constants for interfacing with the ServiceStateProvider and the different fields of the ServiceState class accessible through the provider.

Summary

Constants

String AUTHORITY

The authority string for the ServiceStateProvider

String DATA_NETWORK_TYPE

The current data network type.

String DATA_REG_STATE

An integer value indicating the current data service state.

String DUPLEX_MODE

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

String IS_MANUAL_NETWORK_SELECTION

The current network selection mode.

String VOICE_OPERATOR_NUMERIC

The current registered operator numeric id.

String VOICE_REG_STATE

An integer value indicating the current voice service state.

Fields

public static final Uri CONTENT_URI

The content:// style URL for the ServiceStateProvider

Public methods

static Uri getUriForSubscriptionId(int subscriptionId)

Generates a content Uri used to receive updates on every field in the ServiceState provider.

static Uri getUriForSubscriptionIdAndField(int subscriptionId, String field)

Generates a content Uri used to receive updates on a specific field in the ServiceState provider.

Inherited methods

Constants

AUTHORITY

Added in API level 26
public static final String AUTHORITY

The authority string for the ServiceStateProvider

Constant Value: "service-state"

DATA_NETWORK_TYPE

Added in API level 31
public static final String DATA_NETWORK_TYPE

The current data network type.

This is the same as TelephonyManager#getDataNetworkType().

Constant Value: "data_network_type"

DATA_REG_STATE

Added in API level 31
public static final String DATA_REG_STATE

An integer value indicating the current data service state.

Valid values: ServiceState#STATE_IN_SERVICE, ServiceState#STATE_OUT_OF_SERVICE, ServiceState#STATE_EMERGENCY_ONLY, ServiceState#STATE_POWER_OFF.

Constant Value: "data_reg_state"

DUPLEX_MODE

Added in API level 31
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: ServiceState#DUPLEX_MODE_UNKNOWN, ServiceState#DUPLEX_MODE_FDD, ServiceState#DUPLEX_MODE_TDD.

This is the same as ServiceState#getDuplexMode().

Constant Value: "duplex_mode"

IS_MANUAL_NETWORK_SELECTION

Added in API level 26
public static final String IS_MANUAL_NETWORK_SELECTION

The current network selection mode.

This is the same as ServiceState#getIsManualSelection().

Constant Value: "is_manual_network_selection"

VOICE_OPERATOR_NUMERIC

Added in API level 26
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 ServiceState#getOperatorNumeric().

Constant Value: "voice_operator_numeric"

VOICE_REG_STATE

Added in API level 26
public static final String VOICE_REG_STATE

An integer value indicating the current voice service state.

Valid values: ServiceState#STATE_IN_SERVICE, ServiceState#STATE_OUT_OF_SERVICE, ServiceState#STATE_EMERGENCY_ONLY, ServiceState#STATE_POWER_OFF.

This is the same as ServiceState#getState().

Constant Value: "voice_reg_state"

Fields

CONTENT_URI

Added in API level 26
public static final Uri CONTENT_URI

The content:// style URL for the ServiceStateProvider

Public methods

getUriForSubscriptionId

Added in API level 26
public static Uri getUriForSubscriptionId (int subscriptionId)

Generates a content Uri used to receive updates on every field in the ServiceState provider.

Use this Uri with a ContentObserver to be notified of changes to the ServiceState 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 ServiceState changes

getUriForSubscriptionIdAndField

Added in API level 26
public static Uri getUriForSubscriptionIdAndField (int subscriptionId, 
                String field)

Generates a content Uri used to receive updates on a specific field in the ServiceState provider.

Use this Uri with a ContentObserver to be notified of changes to the ServiceState 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

field String: the ServiceState field to receive updates on

Returns
Uri the Uri used to observe ServiceState changes