SignalStrength
open class SignalStrength : Parcelable
kotlin.Any | |
↳ | android.telephony.SignalStrength |
Contains phone signal strength related information.
Summary
Constants | |
---|---|
static Int |
Indicates the invalid measures of signal strength. |
Inherited constants | |
---|---|
Public constructors | |
---|---|
This constructor is used to create a copy of an existing SignalStrength object. |
Public methods | |
---|---|
open Int | |
open Boolean | |
open Int |
Get the CDMA RSSI value in dBm |
open Int |
Get the CDMA Ec/Io value in dB*10 |
open MutableList<CellSignalStrength!> |
Returns a List of CellSignalStrength Components of this SignalStrength Report. |
open MutableList<T> |
getCellSignalStrengths(clazz: Class<T>) Returns a List of CellSignalStrength Components of this SignalStrength Report. |
open Int |
Get the EVDO RSSI value in dBm |
open Int |
Get the EVDO Ec/Io value in dB*10 |
open Int |
Get the signal to noise ratio. |
open Int |
Get the GSM bit error rate (0-7, 99) as defined in TS 27. |
open Int |
Get the GSM RSSI in ASU. |
open Int |
getLevel() Retrieve an abstract level value for the overall signal strength. |
open Long |
|
open Int |
hashCode() |
open Boolean |
isGsm() |
open String |
toString() |
open Unit |
writeToParcel(out: Parcel, flags: Int) |
Properties | |
---|---|
static Parcelable.Creator<SignalStrength!> |
Constants
INVALID
static val INVALID: Int
Indicates the invalid measures of signal strength. For example, this can be returned by getEvdoDbm()
or getCdmaDbm()
Value: 2147483647
Public constructors
SignalStrength
SignalStrength(s: SignalStrength)
This constructor is used to create a copy of an existing SignalStrength object.
Parameters | |
---|---|
s |
SignalStrength: Source SignalStrength This value cannot be null . |
Public methods
describeContents
open fun describeContents(): Int
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
equals
open fun equals(other: Any?): Boolean
Parameters | |
---|---|
obj |
the reference object with which to compare. |
Return | |
---|---|
Boolean |
true if the signal strengths are the same |
getCdmaDbm
open fungetCdmaDbm(): Int
Deprecated: this information should be retrieved from CellSignalStrengthCdma#getCdmaDbm
.
Get the CDMA RSSI value in dBm
Return | |
---|---|
Int |
the CDMA RSSI value or INVALID if invalid |
getCdmaEcio
open fungetCdmaEcio(): Int
Deprecated: this information should be retrieved from CellSignalStrengthCdma#getCdmaEcio
.
Get the CDMA Ec/Io value in dB*10
getCellSignalStrengths
open fun getCellSignalStrengths(): MutableList<CellSignalStrength!>
Returns a List of CellSignalStrength Components of this SignalStrength Report. Use this API to access underlying CellSignalStrength
objects that provide more granular information about the SignalStrength report. Only valid (non-empty) CellSignalStrengths will be returned. The order of any returned elements is not guaranteed, and the list may contain more than one instance of a CellSignalStrength type.
Return | |
---|---|
MutableList<CellSignalStrength!> |
a List of CellSignalStrength or an empty List if there are no valid measurements. This value cannot be null . |
getCellSignalStrengths
open fun <T : CellSignalStrength!> getCellSignalStrengths(clazz: Class<T>): MutableList<T>
Returns a List of CellSignalStrength Components of this SignalStrength Report. Use this API to access underlying CellSignalStrength
objects that provide more granular information about the SignalStrength report. Only valid (non-empty) CellSignalStrengths will be returned. The order of any returned elements is not guaranteed, and the list may contain more than one instance of a CellSignalStrength type.
Parameters | |
---|---|
clazz |
Class<T>: a class type that extends CellSignalStrength to filter possible return values. This value cannot be null . |
Return | |
---|---|
MutableList<T> |
a List of CellSignalStrength or an empty List if there are no valid measurements. This value cannot be null . |
getEvdoDbm
open fungetEvdoDbm(): Int
Deprecated: this information should be retrieved from CellSignalStrengthCdma#getEvdoDbm
.
Get the EVDO RSSI value in dBm
Return | |
---|---|
Int |
the EVDO RSSI value or INVALID if invalid |
getEvdoEcio
open fungetEvdoEcio(): Int
Deprecated: this information should be retrieved from CellSignalStrengthCdma#getEvdoEcio
.
Get the EVDO Ec/Io value in dB*10
getEvdoSnr
open fungetEvdoSnr(): Int
Deprecated: this information should be retrieved from CellSignalStrengthCdma#getEvdoSnr
.
Get the signal to noise ratio. Valid values are 0-8. 8 is the highest.
getGsmBitErrorRate
open fungetGsmBitErrorRate(): Int
Deprecated: this information should be retrieved from CellSignalStrengthGsm#getBitErrorRate
.
Get the GSM bit error rate (0-7, 99) as defined in TS 27.007 8.5
getGsmSignalStrength
open fungetGsmSignalStrength(): Int
Deprecated: this information should be retrieved from CellSignalStrengthGsm#getAsuLevel
.
Get the GSM RSSI in ASU. Asu is calculated based on 3GPP RSRP. Refer to 3GPP 27.007 (Ver 10.3.0) Sec 8.69
Return | |
---|---|
Int |
RSSI in ASU 0..31, 99, or UNAVAILABLE |
getLevel
open fun getLevel(): Int
Retrieve an abstract level value for the overall signal strength.
Return | |
---|---|
Int |
a single integer from 0 to 4 representing the general signal quality. This may take into account many different radio technology inputs. 0 represents very poor signal strength while 4 represents a very strong signal strength. |
getTimestampMillis
open fun getTimestampMillis(): Long
Value is a non-negative timestamp in the android.os.SystemClock#elapsedRealtime()
time base.
Return | |
---|---|
Long |
timestamp in milliseconds since boot for SignalStrength . This timestamp reports the approximate time that the signal was measured and reported by the modem. It can be used to compare the recency of SignalStrength instances. Value is a non-negative timestamp in the android.os.SystemClock#elapsedRealtime() time base. |
isGsm
open funisGsm(): Boolean
Deprecated: This method returns true if there are any 3gpp type SignalStrength elements in this SignalStrength report or if the report contains no valid SignalStrength information. Instead callers should use android.telephony.SignalStrength#getCellSignalStrengths to determine which types of information are contained in the SignalStrength report.
Return | |
---|---|
Boolean |
true if this is for GSM |
writeToParcel
open fun writeToParcel(
out: Parcel,
flags: Int
): Unit
Parameters | |
---|---|
dest |
The Parcel in which the object should be written. This value cannot be null . |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |