Added in API level 7

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

Parcelable#describeContents

open Boolean
equals(other: Any?)

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>

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

Retrieve an abstract level value for the overall signal strength.

open Long


Value is a non-negative timestamp in the android.os.SystemClock#elapsedRealtime() time base.

open Int

open Boolean

open String

open Unit
writeToParcel(out: Parcel, flags: Int)

Parcelable#writeToParcel

Properties
static Parcelable.Creator<SignalStrength!>

Parcelable.Creator

Constants

INVALID

Added in API level 29
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

Added in API level 7
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

Added in API level 7
open fun describeContents(): Int

Parcelable#describeContents

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

Added in API level 7
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

Added in API level 7
Deprecated in API level 29
open fun getCdmaDbm(): 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

Added in API level 7
Deprecated in API level 29
open fun getCdmaEcio(): Int

Deprecated: this information should be retrieved from CellSignalStrengthCdma#getCdmaEcio.

Get the CDMA Ec/Io value in dB*10

getCellSignalStrengths

Added in API level 29
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

Added in API level 29
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

Added in API level 7
Deprecated in API level 29
open fun getEvdoDbm(): 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

Added in API level 7
Deprecated in API level 29
open fun getEvdoEcio(): Int

Deprecated: this information should be retrieved from CellSignalStrengthCdma#getEvdoEcio.

Get the EVDO Ec/Io value in dB*10

getEvdoSnr

Added in API level 7
Deprecated in API level 29
open fun getEvdoSnr(): 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

Added in API level 7
Deprecated in API level 29
open fun getGsmBitErrorRate(): 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

Added in API level 7
Deprecated in API level 29
open fun getGsmSignalStrength(): 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

Added in API level 23
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

Added in API level 30
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.

hashCode

Added in API level 7
open fun hashCode(): Int
Return
Int hash code

isGsm

Added in API level 7
Deprecated in API level 29
open fun isGsm(): 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

toString

Added in API level 7
open fun toString(): String
Return
String string representation.

writeToParcel

Added in API level 7
open fun writeToParcel(
    out: Parcel,
    flags: Int
): Unit

Parcelable#writeToParcel

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

Properties

CREATOR

Added in API level 30
static val CREATOR: Parcelable.Creator<SignalStrength!>

Parcelable.Creator