# Print output for @column tags ?> TelephonyManager.CellInfoCallback - Android SDK | Android Developers

Most visited

Recently visited

TelephonyManager.CellInfoCallback

public static abstract class TelephonyManager.CellInfoCallback
extends Object

java.lang.Object
   ↳ android.telephony.TelephonyManager.CellInfoCallback


Callback for providing asynchronous CellInfo on request

Summary

Constants

int ERROR_MODEM_ERROR

The modem returned a failure.

int ERROR_TIMEOUT

The system timed out waiting for a response from the Radio.

Public constructors

CellInfoCallback()

Public methods

abstract void onCellInfo(List<CellInfo> cellInfo)

Success response to requestCellInfoUpdate().

void onError(int errorCode, Throwable detail)

Error response to requestCellInfoUpdate().

Inherited methods

Constants

ERROR_MODEM_ERROR

public static final int ERROR_MODEM_ERROR

The modem returned a failure.

Constant Value: 2 (0x00000002)

ERROR_TIMEOUT

public static final int ERROR_TIMEOUT

The system timed out waiting for a response from the Radio.

Constant Value: 1 (0x00000001)

Public constructors

CellInfoCallback

public CellInfoCallback ()

Public methods

onCellInfo

public abstract void onCellInfo (List<CellInfo> cellInfo)

Success response to requestCellInfoUpdate(). Invoked when there is a response to requestCellInfoUpdate() to provide a list of CellInfo. If no CellInfo is available then an empty list will be provided. If an error occurs, null will be provided unless the onError callback is overridden.

Parameters
cellInfo List: a list of CellInfo, an empty list, or null. This value cannot be null.

onError

public void onError (int errorCode, 
                Throwable detail)

Error response to requestCellInfoUpdate(). Invoked when an error condition prevents updated CellInfo from being fetched and returned from the modem. Callers of requestCellInfoUpdate() should override this function to receive detailed status information in the event of an error. By default, this function will invoke onCellInfo() with null.

Parameters
errorCode int: an error code indicating the type of failure. Value is ERROR_TIMEOUT, or ERROR_MODEM_ERROR

detail Throwable: a Throwable object with additional detail regarding the failure if available, otherwise null. This value may be null.