Added in API level 31

CellInfoListener


interface CellInfoListener
android.telephony.TelephonyCallback.CellInfoListener

Interface for cell info listener.

Summary

Public methods
abstract Unit

Callback invoked when a observed cell info has changed or new cells have been added or removed on the registered subscription.

Public methods

onCellInfoChanged

Added in API level 31
abstract fun onCellInfoChanged(cellInfo: MutableList<CellInfo!>): Unit

Callback invoked when a observed cell info has changed or new cells have been added or removed on the registered subscription. Note, the registration subscription ID s from TelephonyManager object which registers TelephonyCallback by TelephonyManager#registerTelephonyCallback(Executor, TelephonyCallback). If this TelephonyManager object was created with TelephonyManager#createForSubscriptionId(int), then the callback applies to the subscription ID. Otherwise, this callback applies to SubscriptionManager#getDefaultSubscriptionId().
Requires android.Manifest.permission#READ_PHONE_STATE and android.Manifest.permission#ACCESS_FINE_LOCATION

Parameters
cellInfo MutableList<CellInfo!>: is the list of currently visible cells. This value cannot be null.