# TelephonyScanManager.NetworkScanCallback

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

# TelephonyScanManager.NetworkScanCallback

*** ** * ** ***

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

`
public
static

abstract
class
TelephonyScanManager.NetworkScanCallback
`  
`

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


``


`

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

<br />

*** ** * ** ***

The caller of[TelephonyManager.requestNetworkScan(android.telephony.NetworkScanRequest, java.util.concurrent.Executor, android.telephony.TelephonyScanManager.NetworkScanCallback)](https://developer.android.com/reference/android/telephony/TelephonyManager#requestNetworkScan(android.telephony.NetworkScanRequest,%20java.util.concurrent.Executor,%20android.telephony.TelephonyScanManager.NetworkScanCallback))should implement and provide this callback so that the scan results or errors can be returned.

## Summary

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

|                                                                                                                                                                                                         ### Public methods                                                                                                                                                                                                          ||
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[onComplete](https://developer.android.com/reference/android/telephony/TelephonyScanManager.NetworkScanCallback#onComplete())`() ` Informs the user that the scan has stopped.                                                                                                                                                                                                                                          |
| ` void` | ` `[onError](https://developer.android.com/reference/android/telephony/TelephonyScanManager.NetworkScanCallback#onError(int))`(int error) ` Informs the user that there is some error about the scan.                                                                                                                                                                                                                      |
| ` void` | ` `[onResults](https://developer.android.com/reference/android/telephony/TelephonyScanManager.NetworkScanCallback#onResults(java.util.List<android.telephony.CellInfo>))`(`[List](https://developer.android.com/reference/java/util/List)`<`[CellInfo](https://developer.android.com/reference/android/telephony/CellInfo)`> results) ` Returns the scan results to the user, this callback will be called multiple times. |

| ### 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*.                                                                                             | ||

## Public constructors

### NetworkScanCallback

```
public NetworkScanCallback ()
```

<br />

<br />

## Public methods

### onComplete

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

```
public void onComplete ()
```

Informs the user that the scan has stopped. This callback will be called when the scan is finished or cancelled by the user. The related NetworkScanRequest will be deleted after this callback.

<br />

### onError

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

```
public void onError (int error)
```

Informs the user that there is some error about the scan. This callback will be called whenever there is any error about the scan, and the scan will be terminated. onComplete() will NOT be called.

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ||
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `error` | `int`: Error code when the scan is failed, as defined in[NetworkScan](https://developer.android.com/reference/android/telephony/NetworkScan). Value is[NetworkScan.ERROR_MODEM_ERROR](https://developer.android.com/reference/android/telephony/NetworkScan#ERROR_MODEM_ERROR),[NetworkScan.ERROR_INVALID_SCAN](https://developer.android.com/reference/android/telephony/NetworkScan#ERROR_INVALID_SCAN),[NetworkScan.ERROR_MODEM_UNAVAILABLE](https://developer.android.com/reference/android/telephony/NetworkScan#ERROR_MODEM_UNAVAILABLE),[NetworkScan.ERROR_UNSUPPORTED](https://developer.android.com/reference/android/telephony/NetworkScan#ERROR_UNSUPPORTED),[NetworkScan.ERROR_RADIO_INTERFACE_ERROR](https://developer.android.com/reference/android/telephony/NetworkScan#ERROR_RADIO_INTERFACE_ERROR),[NetworkScan.ERROR_INVALID_SCANID](https://developer.android.com/reference/android/telephony/NetworkScan#ERROR_INVALID_SCANID), or[NetworkScan.ERROR_INTERRUPTED](https://developer.android.com/reference/android/telephony/NetworkScan#ERROR_INTERRUPTED) <br /> |

### onResults

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

```
public void onResults (List<CellInfo> results)
```

Returns the scan results to the user, this callback will be called multiple times.

<br />

|        Parameters        ||
|-----------|---------------|
| `results` | `List` <br /> |