NetworkScan


public class NetworkScan
extends Object

java.lang.Object
   ↳ android.telephony.NetworkScan


The caller of TelephonyManager.requestNetworkScan(NetworkScanRequest, Executor, NetworkScanCallback) will receive an instance of NetworkScan, which contains a callback method stopScan() for stopping the in-progress scan.

Summary

Constants

int ERROR_INTERRUPTED

The scan has been interrupted by another scan with higher priority.

int ERROR_INVALID_SCAN

The parameters of the scan is invalid.

int ERROR_INVALID_SCANID

The scan ID is invalid.

int ERROR_MODEM_ERROR

The scan has failed due to some modem errors.

int ERROR_MODEM_UNAVAILABLE

The modem can not perform the scan because it is doing something else.

int ERROR_RADIO_INTERFACE_ERROR

The RIL returns nothing or exceptions.

int ERROR_UNSUPPORTED

The modem does not support the request scan.

int SUCCESS

The RIL has successfully performed the network scan.

Public methods

void stopScan()

Stops the network scan Use this method to stop an ongoing scan.

Inherited methods

Constants

ERROR_INTERRUPTED

Added in API level 28
public static final int ERROR_INTERRUPTED

The scan has been interrupted by another scan with higher priority.

Constant Value: 10002 (0x00002712)

ERROR_INVALID_SCAN

Added in API level 28
public static final int ERROR_INVALID_SCAN

The parameters of the scan is invalid.

Constant Value: 2 (0x00000002)

ERROR_INVALID_SCANID

Added in API level 28
public static final int ERROR_INVALID_SCANID

The scan ID is invalid. The user is either trying to stop a scan which does not exist or started by others.

Constant Value: 10001 (0x00002711)

ERROR_MODEM_ERROR

Added in API level 28
public static final int ERROR_MODEM_ERROR

The scan has failed due to some modem errors.

Constant Value: 1 (0x00000001)

ERROR_MODEM_UNAVAILABLE

Added in API level 28
public static final int ERROR_MODEM_UNAVAILABLE

The modem can not perform the scan because it is doing something else.

Constant Value: 3 (0x00000003)

ERROR_RADIO_INTERFACE_ERROR

Added in API level 28
public static final int ERROR_RADIO_INTERFACE_ERROR

The RIL returns nothing or exceptions.

Constant Value: 10000 (0x00002710)

ERROR_UNSUPPORTED

Added in API level 28
public static final int ERROR_UNSUPPORTED

The modem does not support the request scan.

Constant Value: 4 (0x00000004)

SUCCESS

Added in API level 28
public static final int SUCCESS

The RIL has successfully performed the network scan.

Constant Value: 0 (0x00000000)

Public methods

stopScan

Added in API level 28
public void stopScan ()

Stops the network scan Use this method to stop an ongoing scan. When user requests a new scan, a NetworkScan object will be returned, and the user can stop the scan by calling this method.