Network Data and Metrics
Methods mentioned in this section call upon the relevant methods on Android's TelephonyManager
class.
Check Android Develop Docs for more details on how these methods function.
isSmsCapable
Returns Future<bool>
Checks if the device has necessary features to send and receive SMS.
cellularDataState
Returns Future<DataState>
Returns a constant indicating the current data connection state (cellular).
callState
Returns Future<CallState>
Returns a constant that represents the current state of all phone calls.
dataActivity
Returns Future<DataActivity>
Returns a constant indicating the type of activity on a data connection (cellular).
networkOperator
Returns Future<String>
Returns the numeric name (MCC+MNC) of current registered operator.
Availability: Only when user is registered to a network.
Result may be unreliable on CDMA networks (use phoneType to determine if on a CDMA network).
networkOperatorName
Returns Future<String>
Returns the alphabetic name of current registered operator.
Availability: Only when user is registered to a network.
Result may be unreliable on CDMA networks (use phoneType to determine if on a CDMA network).
dataNetworkType
Returns Future<NetworkType>
Requires READ_PHONE_STATE
permission.
Add the following in your AndroidManifest.xml
Returns a constant indicating the radio technology (network type) currently in use on the device for data transmission.
phoneType
Returns Future<PhoneType>
Returns a constant indicating the device phone type. This indicates the type of radio used to transmit voice calls.
simOperator
Returns Future<String>
Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM. 5 or 6 decimal digits.
Availability: SimState must be SIM_STATE_READY
simOperatorName
Returns Future<String>
Returns the Service Provider Name (SPN).
Availability: SimState must be SIM_STATE_READY
simState
Returns Future<SimState>
Returns a constant indicating the state of the default SIM card.
isNetworkRoaming
Returns Future<bool>
Returns true if the device is considered roaming on the current network, for GSM purposes.
Availability: Only when user registered to a network.
signalStrengths
Returns Future<List<SignalStrength>>
Requires Android build version 29 --> Android Q
Returns a List of SignalStrength or an empty List if there are no valid measurements.
serviceState
Returns Future<ServiceState>
Requires Android build version 26 --> Android O
Requires permissions ACCESS_COARSE_LOCATION
and READ_PHONE_STATE
Add the following in your AndroidManifest.xml
Returns current voice service state.
DataState
CallState
DataActivity
NetworkType
PhoneType
SimState
SignalStrength
ServiceState
Last updated