Skip to content

Most visited

Recently visited

navigation

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

From class java.lang.Object

Constants

AUTHORITY

added in API level 26
String AUTHORITY

The authority string for the ServiceStateProvider

Constant Value: "service-state"

IS_MANUAL_NETWORK_SELECTION

added in API level 26
String IS_MANUAL_NETWORK_SELECTION

The current network selection mode.

This is the same as getIsManualSelection().

Constant Value: "is_manual_network_selection"

VOICE_OPERATOR_NUMERIC

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

Constant Value: "voice_operator_numeric"

VOICE_REG_STATE

added in API level 26
String VOICE_REG_STATE

An integer value indicating the current voice service state.

Valid values: STATE_IN_SERVICE, STATE_OUT_OF_SERVICE, STATE_EMERGENCY_ONLY, STATE_POWER_OFF.

This is the same as getState().

Constant Value: "voice_reg_state"

Fields

CONTENT_URI

added in API level 26
Uri CONTENT_URI

The content:// style URL for the ServiceStateProvider

Public methods

getUriForSubscriptionId

added in API level 26
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
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

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)