Added in API level 3
Deprecated in API level 29

NeighboringCellInfo


open class NeighboringCellInfo : Parcelable
kotlin.Any
   ↳ android.telephony.NeighboringCellInfo

Represents the neighboring cell information, including Received Signal Strength and Cell ID location.

Summary

Constants
static Int

Cell location is not available

static Int

Signal strength is not available

Inherited constants
Public constructors

Empty constructor.

Initialize the object from a parcel.

NeighboringCellInfo(rssi: Int, cid: Int)

Initialize the object from rssi and cid.

NeighboringCellInfo(rssi: Int, location: String!, radioType: Int)

Initialize the object from rssi, location string, and radioType radioType is one of following TelephonyManager.NETWORK_TYPE_GPRS, TelephonyManager.NETWORK_TYPE_EDGE, TelephonyManager.NETWORK_TYPE_UMTS, TelephonyManager.NETWORK_TYPE_HSDPA, TelephonyManager.NETWORK_TYPE_HSUPA, and TelephonyManager.NETWORK_TYPE_HSPA.

Public methods
open Int

open Int

open Int

open Int

open Int

open Int

open Unit
setCid(cid: Int)

Set the cell id.

open Unit
setRssi(rssi: Int)

Set the signal strength of the cell.

open String

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

Properties
static Parcelable.Creator<NeighboringCellInfo!>

Constants

UNKNOWN_CID

Added in API level 3
static val UNKNOWN_CID: Int

Deprecated: Deprecated in Java.

Cell location is not available

Value: -1

UNKNOWN_RSSI

Added in API level 3
static val UNKNOWN_RSSI: Int

Deprecated: Deprecated in Java.

Signal strength is not available

Value: 99

Public constructors

NeighboringCellInfo

Added in API level 3
NeighboringCellInfo()

Deprecated: by NeighboringCellInfo(int,java.lang.String,int)

Empty constructor. Initializes the RSSI and CID. NeighboringCellInfo is one time shot for the neighboring cells based on the radio network type at that moment. Its constructor needs radio network type.

NeighboringCellInfo

Added in API level 3
NeighboringCellInfo(in: Parcel!)

Initialize the object from a parcel.

NeighboringCellInfo

Added in API level 3
NeighboringCellInfo(
    rssi: Int,
    cid: Int)

Deprecated: by NeighboringCellInfo(int,java.lang.String,int)

Initialize the object from rssi and cid. NeighboringCellInfo is one time shot for the neighboring cells based on the radio network type at that moment. Its constructor needs radio network type.

NeighboringCellInfo

Added in API level 7
NeighboringCellInfo(
    rssi: Int,
    location: String!,
    radioType: Int)

Initialize the object from rssi, location string, and radioType radioType is one of following TelephonyManager.NETWORK_TYPE_GPRS, TelephonyManager.NETWORK_TYPE_EDGE, TelephonyManager.NETWORK_TYPE_UMTS, TelephonyManager.NETWORK_TYPE_HSDPA, TelephonyManager.NETWORK_TYPE_HSUPA, and TelephonyManager.NETWORK_TYPE_HSPA.

Public methods

describeContents

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

Deprecated: Deprecated in Java.

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

getCid

Added in API level 3
open fun getCid(): Int

Deprecated: Deprecated in Java.

Return
Int cell id in GSM, 0xffff max legal value UNKNOWN_CID if in UMTS or CDMA or unknown

getLac

Added in API level 5
Deprecated in API level 29
open fun getLac(): Int

Deprecated: Deprecated in Java.

Return
Int LAC in GSM, 0xffff max legal value UNKNOWN_CID if in UMTS or CMDA or unknown

getNetworkType

Added in API level 5
Deprecated in API level 29
open fun getNetworkType(): Int

Deprecated: Deprecated in Java.

Return
Int Radio network type while neighboring cell location is stored. Return TelephonyManager.NETWORK_TYPE_UNKNOWN means that the location information is unavailable. Return TelephonyManager.NETWORK_TYPE_GPRS or TelephonyManager.NETWORK_TYPE_EDGE means that Neighboring Cell information is stored for GSM network, in which NeighboringCellInfo.getLac and NeighboringCellInfo.getCid should be called to access location. Return TelephonyManager.NETWORK_TYPE_UMTS, TelephonyManager.NETWORK_TYPE_HSDPA, TelephonyManager.NETWORK_TYPE_HSUPA, or TelephonyManager.NETWORK_TYPE_HSPA means that Neighboring Cell information is stored for UMTS network, in which NeighboringCellInfo.getPsc should be called to access location.

getPsc

Added in API level 5
Deprecated in API level 29
open fun getPsc(): Int

Deprecated: Deprecated in Java.

Return
Int Primary Scrambling Code in 9 bits format in UMTS, 0x1ff max value UNKNOWN_CID if in GSM or CMDA or unknown

getRssi

Added in API level 3
open fun getRssi(): Int

Deprecated: Deprecated in Java.

Return
Int received signal strength or UNKNOWN_RSSI if unknown For GSM, it is in "asu" ranging from 0 to 31 (dBm = -113 + 2*asu) 0 means "-113 dBm or less" and 31 means "-51 dBm or greater" For UMTS, it is the Level index of CPICH RSCP defined in TS 25.125

setCid

Added in API level 3
Deprecated in API level 15
open fun setCid(cid: Int): Unit

Deprecated: cid value passed as in location parameter passed to constructor NeighboringCellInfo(int,java.lang.String,int)

Set the cell id. NeighboringCellInfo is a one time shot for the neighboring cells based on the radio network type at that moment. It shouldn't be changed after creation.

setRssi

Added in API level 3
Deprecated in API level 15
open fun setRssi(rssi: Int): Unit

Deprecated: initial rssi value passed as parameter to constructor NeighboringCellInfo(int,java.lang.String,int)

Set the signal strength of the cell. NeighboringCellInfo is a one time shot for the neighboring cells based on the radio network type at that moment. It shouldn't be changed after creation.

toString

Added in API level 3
open fun toString(): String

Deprecated: Deprecated in Java.

Return
String a string representation of the object.

writeToParcel

Added in API level 3
open fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Deprecated: Deprecated in Java.

Parameters
dest Parcel: 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 3
static val CREATOR: Parcelable.Creator<NeighboringCellInfo!>

Deprecated: Deprecated in Java.