CellInfoCallback
abstract class CellInfoCallback
kotlin.Any | |
↳ | android.telephony.TelephonyManager.CellInfoCallback |
Callback for providing asynchronous CellInfo
on request
Summary
Constants | |
---|---|
static Int |
The modem returned a failure. |
static Int |
The system timed out waiting for a response from the Radio. |
Public constructors | |
---|---|
Public methods | |
---|---|
abstract Unit |
onCellInfo(cellInfo: MutableList<CellInfo!>) Success response to |
open Unit |
Error response to |
Constants
ERROR_MODEM_ERROR
static val ERROR_MODEM_ERROR: Int
The modem returned a failure.
Value: 2
ERROR_TIMEOUT
static val ERROR_TIMEOUT: Int
The system timed out waiting for a response from the Radio.
Value: 1
Public constructors
CellInfoCallback
CellInfoCallback()
Public methods
onCellInfo
abstract fun onCellInfo(cellInfo: MutableList<CellInfo!>): Unit
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 |
MutableList<CellInfo!>: a list of CellInfo or an empty list. {@see android.telephony.TelephonyManager#getAllCellInfo getAllCellInfo()} This value cannot be null . |
onError
open fun onError(
errorCode: Int,
detail: Throwable?
): Unit
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 android.telephony.TelephonyManager.CellInfoCallback#ERROR_TIMEOUT , or android.telephony.TelephonyManager.CellInfoCallback#ERROR_MODEM_ERROR |
detail |
Throwable?: a Throwable object with additional detail regarding the failure if available, otherwise null. |