Stay organized with collections
Save and categorize content based on your preferences.
NetworkScan
open class NetworkScan
The caller of android.telephony.TelephonyManager#requestNetworkScan(android.telephony.NetworkScanRequest,Executor,NetworkScanCallback) will receive an instance of NetworkScan
, which contains a callback method stopScan()
for stopping the in-progress scan.
Summary
Constants |
static Int |
The scan has been interrupted by another scan with higher priority.
|
static Int |
The parameters of the scan is invalid.
|
static Int |
The scan ID is invalid.
|
static Int |
The scan has failed due to some modem errors.
|
static Int |
The modem can not perform the scan because it is doing something else.
|
static Int |
The RIL returns nothing or exceptions.
|
static Int |
The modem does not support the request scan.
|
static Int |
The RIL has successfully performed the network scan.
|
Public methods |
open Unit |
Stops the network scan Use this method to stop an ongoing scan.
|
Constants
ERROR_INTERRUPTED
static val ERROR_INTERRUPTED: Int
The scan has been interrupted by another scan with higher priority.
Value: 10002
ERROR_INVALID_SCAN
static val ERROR_INVALID_SCAN: Int
The parameters of the scan is invalid.
Value: 2
ERROR_INVALID_SCANID
static val ERROR_INVALID_SCANID: Int
The scan ID is invalid. The user is either trying to stop a scan which does not exist or started by others.
Value: 10001
ERROR_MODEM_ERROR
static val ERROR_MODEM_ERROR: Int
The scan has failed due to some modem errors.
Value: 1
ERROR_MODEM_UNAVAILABLE
static val ERROR_MODEM_UNAVAILABLE: Int
The modem can not perform the scan because it is doing something else.
Value: 3
ERROR_RADIO_INTERFACE_ERROR
static val ERROR_RADIO_INTERFACE_ERROR: Int
The RIL returns nothing or exceptions.
Value: 10000
ERROR_UNSUPPORTED
static val ERROR_UNSUPPORTED: Int
The modem does not support the request scan.
Value: 4
SUCCESS
static val SUCCESS: Int
The RIL has successfully performed the network scan.
Value: 0
Public methods
stopScan
open fun stopScan(): Unit
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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# NetworkScan\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nNetworkScan\n===========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/telephony/NetworkScan \"View this page in Java\") \n\n```\nopen class NetworkScan\n```\n\n|---|------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.telephony.NetworkScan](#) |\n\nThe caller of android.telephony.TelephonyManager#requestNetworkScan(android.telephony.NetworkScanRequest,Executor,NetworkScanCallback) will receive an instance of [NetworkScan](#), which contains a callback method [stopScan()](#stopScan()) for stopping the in-progress scan.\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_INTERRUPTED](#ERROR_INTERRUPTED:kotlin.Int) The scan has been interrupted by another scan with higher priority. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_INVALID_SCAN](#ERROR_INVALID_SCAN:kotlin.Int) The parameters of the scan is invalid. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_INVALID_SCANID](#ERROR_INVALID_SCANID:kotlin.Int) The scan ID is invalid. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_MODEM_ERROR](#ERROR_MODEM_ERROR:kotlin.Int) The scan has failed due to some modem errors. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_MODEM_UNAVAILABLE](#ERROR_MODEM_UNAVAILABLE:kotlin.Int) The modem can not perform the scan because it is doing something else. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_RADIO_INTERFACE_ERROR](#ERROR_RADIO_INTERFACE_ERROR:kotlin.Int) The RIL returns nothing or exceptions. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_UNSUPPORTED](#ERROR_UNSUPPORTED:kotlin.Int) The modem does not support the request scan. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [SUCCESS](#SUCCESS:kotlin.Int) The RIL has successfully performed the network scan. |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [stopScan](#stopScan())`()` Stops the network scan Use this method to stop an ongoing scan. |\n\nConstants\n---------\n\n### ERROR_INTERRUPTED\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_INTERRUPTED: Int\n```\n\nThe scan has been interrupted by another scan with higher priority. \n\n Value: 10002\n\n### ERROR_INVALID_SCAN\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_INVALID_SCAN: Int\n```\n\nThe parameters of the scan is invalid. \n\n Value: 2\n\n### ERROR_INVALID_SCANID\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_INVALID_SCANID: Int\n```\n\nThe scan ID is invalid. The user is either trying to stop a scan which does not exist or started by others. \n\n Value: 10001\n\n### ERROR_MODEM_ERROR\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_MODEM_ERROR: Int\n```\n\nThe scan has failed due to some modem errors. \n\n Value: 1\n\n### ERROR_MODEM_UNAVAILABLE\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_MODEM_UNAVAILABLE: Int\n```\n\nThe modem can not perform the scan because it is doing something else. \n\n Value: 3\n\n### ERROR_RADIO_INTERFACE_ERROR\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_RADIO_INTERFACE_ERROR: Int\n```\n\nThe RIL returns nothing or exceptions. \n\n Value: 10000\n\n### ERROR_UNSUPPORTED\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_UNSUPPORTED: Int\n```\n\nThe modem does not support the request scan. \n\n Value: 4\n\n### SUCCESS\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val SUCCESS: Int\n```\n\nThe RIL has successfully performed the network scan. \n\n Value: 0\n\nPublic methods\n--------------\n\n### stopScan\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun stopScan(): Unit\n```\n\nStops 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."]]