Language

TelephonyManager.RequestNetworkScan Method

Definition

Overloads

RequestNetworkScan(Int32, NetworkScanRequest, IExecutor, TelephonyScanManager+NetworkScanCallback)

Request a network scan.

[Android.Runtime.Register("requestNetworkScan", "(ILandroid/telephony/NetworkScanRequest;Ljava/util/concurrent/Executor;Landroid/telephony/TelephonyScanManager$NetworkScanCallback;)Landroid/telephony/NetworkScan;", "GetRequestNetworkScan_ILandroid_telephony_NetworkScanRequest_Ljava_util_concurrent_Executor_Landroid_telephony_TelephonyScanManager_NetworkScanCallback_Handler", ApiSince=33)]
public virtual Android.Telephony.NetworkScan? RequestNetworkScan(int includeLocationData, Android.Telephony.NetworkScanRequest request, Java.Util.Concurrent.IExecutor executor, Android.Telephony.TelephonyScanManager.NetworkScanCallback callback);
[<Android.Runtime.Register("requestNetworkScan", "(ILandroid/telephony/NetworkScanRequest;Ljava/util/concurrent/Executor;Landroid/telephony/TelephonyScanManager$NetworkScanCallback;)Landroid/telephony/NetworkScan;", "GetRequestNetworkScan_ILandroid_telephony_NetworkScanRequest_Ljava_util_concurrent_Executor_Landroid_telephony_TelephonyScanManager_NetworkScanCallback_Handler", ApiSince=33)>]
abstract member RequestNetworkScan : int * Android.Telephony.NetworkScanRequest * Java.Util.Concurrent.IExecutor * Android.Telephony.TelephonyScanManager.NetworkScanCallback -> Android.Telephony.NetworkScan
override this.RequestNetworkScan : int * Android.Telephony.NetworkScanRequest * Java.Util.Concurrent.IExecutor * Android.Telephony.TelephonyScanManager.NetworkScanCallback -> Android.Telephony.NetworkScan

Parameters

includeLocationData
Int32

Specifies if the caller would like to receive location related information. If this parameter is set to INCLUDE_LOCATION_DATA_FINE then the application will be checked for Manifest.permission.ACCESS_FINE_LOCATION permission and available location related information received during network scan will be sent to the caller. Value is one of the following: INCLUDE_LOCATION_DATA_NONE INCLUDE_LOCATION_DATA_COARSE INCLUDE_LOCATION_DATA_FINE

request
NetworkScanRequest

Contains all the RAT with bands/channels that need to be scanned. This value cannot be null.

executor
IExecutor

The executor through which the callback should be invoked. Since the scan request may trigger multiple callbacks and they must be invoked in the same order as they are received by the platform, the user should provide an executor which executes tasks one at a time in serial order. This value cannot be null.

callback
TelephonyScanManager.NetworkScanCallback

Returns network scan results or errors. This value cannot be null.

Returns

A NetworkScan obj which contains a callback which can be used to stop the scan. This value may be null.

Attributes

Remarks

Request a network scan. This method is asynchronous, so the network scan results will be returned by callback. The returned NetworkScan will contain a callback method which can be used to stop the scan. Requires Permission: MODIFY_PHONE_STATE or that the calling app has carrier privileges (see hasCarrierPrivileges() ) and Manifest.permission.ACCESS_FINE_LOCATION if includeLocationData is set to INCLUDE_LOCATION_DATA_FINE. If the system-wide location switch is off, apps may still call this API, with the following constraints: The app must hold the android.permission.NETWORK_SCAN permission. The app must not supply any specific bands or channels to scan. The app must only specify MCC/MNC pairs that are associated to a SIM in the device. Returned results will have no meaningful info other than signal strength and MCC/MNC info.. Requires Manifest.permission.MODIFY_PHONE_STATE Requires the PackageManager#FEATURE_TELEPHONY_RADIO_ACCESS feature which can be detected using PackageManager.hasSystemFeature(String).

Android reference for android.telephony.TelephonyManager.requestNetworkScan.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

RequestNetworkScan(NetworkScanRequest, IExecutor, TelephonyScanManager+NetworkScanCallback)

Request a network scan.

[Android.Runtime.Register("requestNetworkScan", "(Landroid/telephony/NetworkScanRequest;Ljava/util/concurrent/Executor;Landroid/telephony/TelephonyScanManager$NetworkScanCallback;)Landroid/telephony/NetworkScan;", "GetRequestNetworkScan_Landroid_telephony_NetworkScanRequest_Ljava_util_concurrent_Executor_Landroid_telephony_TelephonyScanManager_NetworkScanCallback_Handler", ApiSince=28)]
public virtual Android.Telephony.NetworkScan? RequestNetworkScan(Android.Telephony.NetworkScanRequest? request, Java.Util.Concurrent.IExecutor? executor, Android.Telephony.TelephonyScanManager.NetworkScanCallback? callback);
[<Android.Runtime.Register("requestNetworkScan", "(Landroid/telephony/NetworkScanRequest;Ljava/util/concurrent/Executor;Landroid/telephony/TelephonyScanManager$NetworkScanCallback;)Landroid/telephony/NetworkScan;", "GetRequestNetworkScan_Landroid_telephony_NetworkScanRequest_Ljava_util_concurrent_Executor_Landroid_telephony_TelephonyScanManager_NetworkScanCallback_Handler", ApiSince=28)>]
abstract member RequestNetworkScan : Android.Telephony.NetworkScanRequest * Java.Util.Concurrent.IExecutor * Android.Telephony.TelephonyScanManager.NetworkScanCallback -> Android.Telephony.NetworkScan
override this.RequestNetworkScan : Android.Telephony.NetworkScanRequest * Java.Util.Concurrent.IExecutor * Android.Telephony.TelephonyScanManager.NetworkScanCallback -> Android.Telephony.NetworkScan

Parameters

request
NetworkScanRequest

Contains all the RAT with bands/channels that need to be scanned.

executor
IExecutor

The executor through which the callback should be invoked. Since the scan request may trigger multiple callbacks and they must be invoked in the same order as they are received by the platform, the user should provide an executor which executes tasks one at a time in serial order.

callback
TelephonyScanManager.NetworkScanCallback

Returns network scan results or errors.

Returns

A NetworkScan obj which contains a callback which can be used to stop the scan.

Attributes

Remarks

Request a network scan. This method is asynchronous, so the network scan results will be returned by callback. The returned NetworkScan will contain a callback method which can be used to stop the scan. Requires Permission: MODIFY_PHONE_STATE or that the calling app has carrier privileges (see hasCarrierPrivileges() ) and Manifest.permission.ACCESS_FINE_LOCATION. If the system-wide location switch is off, apps may still call this API, with the following constraints: The app must hold the android.permission.NETWORK_SCAN permission. The app must not supply any specific bands or channels to scan. The app must only specify MCC/MNC pairs that are associated to a SIM in the device. Returned results will have no meaningful info other than signal strength and MCC/MNC info.. Requires Manifest.permission.MODIFY_PHONE_STATE and Manifest.permission.ACCESS_FINE_LOCATION Requires the PackageManager#FEATURE_TELEPHONY_RADIO_ACCESS feature which can be detected using PackageManager.hasSystemFeature(String).

Android reference for android.telephony.TelephonyManager.requestNetworkScan.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to