共用方式為


WifiRttManager.StartRanging Method

Definition

Initiate a request to range to a set of devices specified in the RangingRequest.

[Android.Runtime.Register("startRanging", "(Landroid/net/wifi/rtt/RangingRequest;Ljava/util/concurrent/Executor;Landroid/net/wifi/rtt/RangingResultCallback;)V", "GetStartRanging_Landroid_net_wifi_rtt_RangingRequest_Ljava_util_concurrent_Executor_Landroid_net_wifi_rtt_RangingResultCallback_Handler", ApiSince=28)]
public virtual void StartRanging (Android.Net.Wifi.Rtt.RangingRequest request, Java.Util.Concurrent.IExecutor executor, Android.Net.Wifi.Rtt.RangingResultCallback callback);
[<Android.Runtime.Register("startRanging", "(Landroid/net/wifi/rtt/RangingRequest;Ljava/util/concurrent/Executor;Landroid/net/wifi/rtt/RangingResultCallback;)V", "GetStartRanging_Landroid_net_wifi_rtt_RangingRequest_Ljava_util_concurrent_Executor_Landroid_net_wifi_rtt_RangingResultCallback_Handler", ApiSince=28)>]
abstract member StartRanging : Android.Net.Wifi.Rtt.RangingRequest * Java.Util.Concurrent.IExecutor * Android.Net.Wifi.Rtt.RangingResultCallback -> unit
override this.StartRanging : Android.Net.Wifi.Rtt.RangingRequest * Java.Util.Concurrent.IExecutor * Android.Net.Wifi.Rtt.RangingResultCallback -> unit

Parameters

request
RangingRequest

A request specifying a set of devices whose distance measurements are requested.

executor
IExecutor

The Executor on which to run the callback.

callback
RangingResultCallback

A callback for the result of the ranging request.

Attributes

Remarks

Initiate a request to range to a set of devices specified in the RangingRequest. Results will be returned in the RangingResultCallback set of callbacks.

Ranging request with only Wifi Aware peers can be performed with either android.Manifest.permission#NEARBY_WIFI_DEVICES with android:usesPermissionFlags="neverForLocation", or android.Manifest.permission#ACCESS_FINE_LOCATION. All other types of ranging requests require android.Manifest.permission#ACCESS_FINE_LOCATION.

Java documentation for android.net.wifi.rtt.WifiRttManager.startRanging(android.net.wifi.rtt.RangingRequest, java.util.concurrent.Executor, android.net.wifi.rtt.RangingResultCallback).

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