1<HTML> 2<BODY> 3<p>Provides classes which allow applications to use Wi-Fi RTT (IEEE 802.11mc) to measure distance 4 to supporting Access Points and peer devices.</p> 5<p>The primary entry point to Wi-Fi RTT capabilities is the 6 {@link android.net.wifi.rtt.WifiRttManager} class, which is acquired by calling 7 {@link android.content.Context#getSystemService(String) 8 Context.getSystemService(Context.WIFI_RTT_RANGING_SERVICE)}</p> 9 10<p>Some APIs may require the following user permissions:</p> 11<ul> 12 <li>{@link android.Manifest.permission#ACCESS_WIFI_STATE}</li> 13 <li>{@link android.Manifest.permission#CHANGE_WIFI_STATE}</li> 14 <li>{@link android.Manifest.permission#ACCESS_FINE_LOCATION}</li> 15</ul> 16<p>Usage of the API is also gated by the device's Location Mode: whether it permits Wi-Fi based 17location to be queried.</p> 18 19<p class="note"><strong>Note:</strong> Not all Android-powered devices support Wi-Fi RTT 20 functionality. 21 If your application only works with Wi-Fi RTT (i.e. it should only be installed on devices which 22 support Wi-Fi RTT), declare so with a <a 23 href="{@docRoot}guide/topics/manifest/uses-feature-element.html"> 24 {@code <uses-feature>}</a> 25 element in the manifest file:</p> 26<pre> 27<manifest ...> 28 <uses-feature android:name="android.hardware.wifi.rtt" /> 29 ... 30</manifest> 31</pre> 32<p>Alternatively, if your application does not require Wi-Fi RTT but can take advantage of it if 33 available, you can perform 34 the check at run-time in your code using {@link 35 android.content.pm.PackageManager#hasSystemFeature(String)} with {@link 36 android.content.pm.PackageManager#FEATURE_WIFI_RTT}:</p> 37<pre> 38 getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI_RTT) 39</pre> 40 41<p>For an example of this functionality, see 42<a href="{@docRoot}guide/topics/connectivity/wifi-rtt" class="external">Wi-Fi location: ranging 43with RTT</a>.</p> 44</BODY> 45</HTML> 46