lightbulb_outline Please take our October 2018 developer survey. Start survey

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

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