# TelephonyManager.CellInfoCallback

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Constants](https://developer.android.com/reference/android/telephony/TelephonyManager.CellInfoCallback#constants)\|[Ctors](https://developer.android.com/reference/android/telephony/TelephonyManager.CellInfoCallback#pubctors)\|[Methods](https://developer.android.com/reference/android/telephony/TelephonyManager.CellInfoCallback#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/telephony/TelephonyManager.CellInfoCallback#inhmethods)  

# TelephonyManager.CellInfoCallback

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CellInfoCallback "View this page in Kotlin")\|Java

`
public
static

abstract
class
TelephonyManager.CellInfoCallback
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|-----------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.telephony.TelephonyManager.CellInfoCallback |

<br />

*** ** * ** ***

Callback for providing asynchronous[CellInfo](https://developer.android.com/reference/android/telephony/CellInfo)on request

## Summary

|                                                                                         ### Constants                                                                                         ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [ERROR_MODEM_ERROR](https://developer.android.com/reference/android/telephony/TelephonyManager.CellInfoCallback#ERROR_MODEM_ERROR) The modem returned a failure.                       |
| `int` | [ERROR_TIMEOUT](https://developer.android.com/reference/android/telephony/TelephonyManager.CellInfoCallback#ERROR_TIMEOUT) The system timed out waiting for a response from the Radio. |

|                                                            ### Public constructors                                                            ||
|--------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[CellInfoCallback](https://developer.android.com/reference/android/telephony/TelephonyManager.CellInfoCallback#CellInfoCallback())`() ` |

|                                                                                                                                                                                                                                                                                     ### Public methods                                                                                                                                                                                                                                                                                      ||
|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onCellInfo](https://developer.android.com/reference/android/telephony/TelephonyManager.CellInfoCallback#onCellInfo(java.util.List<android.telephony.CellInfo>))`(`[List](https://developer.android.com/reference/java/util/List)`<`[CellInfo](https://developer.android.com/reference/android/telephony/CellInfo)`> cellInfo) ` Success response to[requestCellInfoUpdate()](https://developer.android.com/reference/android/telephony/TelephonyManager#requestCellInfoUpdate(java.util.concurrent.Executor,%20android.telephony.TelephonyManager.CellInfoCallback)). |
| ` void`          | ` `[onError](https://developer.android.com/reference/android/telephony/TelephonyManager.CellInfoCallback#onError(int,%20java.lang.Throwable))`(int errorCode, `[Throwable](https://developer.android.com/reference/java/lang/Throwable)` detail) ` Error response to[requestCellInfoUpdate()](https://developer.android.com/reference/android/telephony/TelephonyManager#requestCellInfoUpdate(java.util.concurrent.Executor,%20android.telephony.TelephonyManager.CellInfoCallback)).                                                                                    |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Constants

### ERROR_MODEM_ERROR

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int ERROR_MODEM_ERROR
```

The modem returned a failure.

<br />

Constant Value: 2 (0x00000002)  

### ERROR_TIMEOUT

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int ERROR_TIMEOUT
```

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

<br />

Constant Value: 1 (0x00000001)

## Public constructors

### CellInfoCallback

```
public CellInfoCallback ()
```

<br />

<br />

## Public methods

### onCellInfo

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract void onCellInfo (List<CellInfo> cellInfo)
```

Success response to[requestCellInfoUpdate()](https://developer.android.com/reference/android/telephony/TelephonyManager#requestCellInfoUpdate(java.util.concurrent.Executor,%20android.telephony.TelephonyManager.CellInfoCallback)). Invoked when there is a response to[requestCellInfoUpdate()](https://developer.android.com/reference/android/telephony/TelephonyManager#requestCellInfoUpdate(java.util.concurrent.Executor,%20android.telephony.TelephonyManager.CellInfoCallback))to provide a list of[CellInfo](https://developer.android.com/reference/android/telephony/CellInfo). If no[CellInfo](https://developer.android.com/reference/android/telephony/CellInfo)is available then an empty list will be provided. If an error occurs, null will be provided unless the onError callback is overridden.

<br />

|                                                                           Parameters                                                                            ||
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| `cellInfo` | `List`: a list of[CellInfo](https://developer.android.com/reference/android/telephony/CellInfo)or an empty list. This value cannot be`null`. <br /> |

### onError

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void onError (int errorCode, 
                Throwable detail)
```

Error response to[requestCellInfoUpdate()](https://developer.android.com/reference/android/telephony/TelephonyManager#requestCellInfoUpdate(java.util.concurrent.Executor,%20android.telephony.TelephonyManager.CellInfoCallback)). Invoked when an error condition prevents updated[CellInfo](https://developer.android.com/reference/android/telephony/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.

<br />

|                                                                                                                                                                    Parameters                                                                                                                                                                     ||
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `errorCode` | `int`: an error code indicating the type of failure. Value is[ERROR_TIMEOUT](https://developer.android.com/reference/android/telephony/TelephonyManager.CellInfoCallback#ERROR_TIMEOUT), or[ERROR_MODEM_ERROR](https://developer.android.com/reference/android/telephony/TelephonyManager.CellInfoCallback#ERROR_MODEM_ERROR) <br /> |
| `detail`    | `Throwable`: a Throwable object with additional detail regarding the failure if available, otherwise null. <br />                                                                                                                                                                                                                    |