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

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(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(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()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

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.