ServiceStateTable
class ServiceStateTable
kotlin.Any | |
↳ | android.provider.Telephony.ServiceStateTable |
Constants for interfacing with the ServiceStateProvider and the different fields of the ServiceState
class accessible through the provider.
Summary
Constants | |
---|---|
static String |
The authority string for the ServiceStateProvider |
static String |
The current data network type. |
static String |
An integer value indicating the current data service state. |
static String |
An integer value indicating the current duplex mode if the radio technology is LTE, LTE-CA or NR. |
static String |
The current network selection mode. |
static String |
The current registered operator numeric id. |
static String |
An integer value indicating the current voice service state. |
Public methods | |
---|---|
static Uri! |
getUriForSubscriptionId(subscriptionId: Int) Generates a content |
static Uri! |
getUriForSubscriptionIdAndField(subscriptionId: Int, field: String!) Generates a content |
Properties | |
---|---|
static Uri! |
The |
Constants
AUTHORITY
static val AUTHORITY: String
The authority string for the ServiceStateProvider
Value: "service-state"
DATA_NETWORK_TYPE
static val DATA_NETWORK_TYPE: String
The current data network type.
This is the same as TelephonyManager.getDataNetworkType()
.
Value: "data_network_type"
DATA_REG_STATE
static val DATA_REG_STATE: String
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
.
Value: "data_reg_state"
DUPLEX_MODE
static val DUPLEX_MODE: String
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()
.
Value: "duplex_mode"
IS_MANUAL_NETWORK_SELECTION
static val IS_MANUAL_NETWORK_SELECTION: String
The current network selection mode.
This is the same as ServiceState.getIsManualSelection()
.
Value: "is_manual_network_selection"
VOICE_OPERATOR_NUMERIC
static val VOICE_OPERATOR_NUMERIC: String
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()
.
Value: "voice_operator_numeric"
VOICE_REG_STATE
static val VOICE_REG_STATE: String
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()
.
Value: "voice_reg_state"
Public methods
getUriForSubscriptionId
static fun getUriForSubscriptionId(subscriptionId: Int): Uri!
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 android.app.job.JobService
to ensure your app is notified of changes to the Uri
even when it is not running. Note, however, that using a android.app.job.JobService
does not guarantee timely delivery of updates to the Uri
.
Parameters | |
---|---|
subscriptionId |
Int: the subscriptionId to receive updates on |
Return | |
---|---|
Uri! |
the Uri used to observe ServiceState changes |
getUriForSubscriptionIdAndField
static fun getUriForSubscriptionIdAndField(
subscriptionId: Int,
field: String!
): Uri!
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 android.app.job.JobService
to ensure your app is notified of changes to the Uri
even when it is not running. Note, however, that using a android.app.job.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 |
Return | |
---|---|
Uri! |
the Uri used to observe ServiceState changes |
Properties
CONTENT_URI
static val CONTENT_URI: Uri!
The content://
style URL for the ServiceStateProvider