Added in API level 31

TelephonyCallback.CellInfoListener

public static interface TelephonyCallback.CellInfoListener

android.telephony.TelephonyCallback.CellInfoListener


Interface for cell info listener.

Summary

Public methods

abstract void onCellInfoChanged(List<CellInfo> cellInfo)

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
public abstract void onCellInfoChanged (List<CellInfo> cellInfo)

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 Manifest.permission.READ_PHONE_STATE and Manifest.permission.ACCESS_FINE_LOCATION

Parameters
cellInfo List: is the list of currently visible cells. This value cannot be null.