다음을 통해 공유


TelephonyManager.AllCellInfo Property

Definition

Requests all available cell information from all radios on the device including the camped/registered, serving, and neighboring cells.

public virtual System.Collections.Generic.IList<Android.Telephony.CellInfo>? AllCellInfo { [Android.Runtime.Register("getAllCellInfo", "()Ljava/util/List;", "GetGetAllCellInfoHandler")] [Android.Runtime.RequiresPermission("android.permission.ACCESS_FINE_LOCATION")] get; }
[<get: Android.Runtime.Register("getAllCellInfo", "()Ljava/util/List;", "GetGetAllCellInfoHandler")>]
[<get: Android.Runtime.RequiresPermission("android.permission.ACCESS_FINE_LOCATION")>]
member this.AllCellInfo : System.Collections.Generic.IList<Android.Telephony.CellInfo>

Property Value

List of android.telephony.CellInfo; null if cell information is unavailable.

Attributes

Remarks

Requests all available cell information from all radios on the device including the camped/registered, serving, and neighboring cells.

The response can include one or more android.telephony.CellInfoGsm CellInfoGsm, android.telephony.CellInfoCdma CellInfoCdma, android.telephony.CellInfoTdscdma CellInfoTdscdma, android.telephony.CellInfoLte CellInfoLte, and android.telephony.CellInfoWcdma CellInfoWcdma objects, in any combination. It is typical to see instances of one or more of any these in the list. In addition, zero or more of the returned objects may be considered registered; that is, their android.telephony.CellInfo#isRegistered CellInfo.isRegistered() methods may return true, indicating that the cell is being used or would be used for signaling communication if necessary.

Beginning with android.os.Build.VERSION_CODES#Q Android Q, if this API results in a change of the cached CellInfo, that change will be reported via android.telephony.PhoneStateListener#onCellInfoChanged onCellInfoChanged().

Apps targeting android.os.Build.VERSION_CODES#Q Android Q or higher will no longer trigger a refresh of the cached CellInfo by invoking this API. Instead, those apps will receive the latest cached results, which may not be current. Apps targeting android.os.Build.VERSION_CODES#Q Android Q or higher that wish to request updated CellInfo should call android.telephony.TelephonyManager#requestCellInfoUpdate requestCellInfoUpdate(); however, in all cases, updates will be rate-limited and are not guaranteed. To determine the recency of CellInfo data, callers should check android.telephony.CellInfo#getTimeStamp CellInfo#getTimeStamp().

This method returns valid data for devices with android.content.pm.PackageManager#FEATURE_TELEPHONY FEATURE_TELEPHONY. In cases where only partial information is available for a particular CellInfo entry, unavailable fields will be reported as android.telephony.CellInfo#UNAVAILABLE. All reported cells will include at least a valid set of technology-specific identification info and a power level measurement.

This method is preferred over using android.telephony.TelephonyManager#getCellLocation getCellLocation().

Java documentation for android.telephony.TelephonyManager.getAllCellInfo().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to