From 63fcb397a2583255ec4a0f5e5d8c4c124c272616 Mon Sep 17 00:00:00 2001 From: Scott Main Date: Tue, 18 Oct 2011 10:17:17 -0700 Subject: docs: add package description for wifi.p2p and update the one for wifi Change-Id: Iaf80f9640a4d56100e22d93954edd8aeb5ea4d2b --- wifi/java/android/net/wifi/p2p/package.html | 68 +++++++++++++++++++++++++++++ wifi/java/android/net/wifi/package.html | 21 ++++++++- 2 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 wifi/java/android/net/wifi/p2p/package.html (limited to 'wifi') diff --git a/wifi/java/android/net/wifi/p2p/package.html b/wifi/java/android/net/wifi/p2p/package.html new file mode 100644 index 0000000..94d695f --- /dev/null +++ b/wifi/java/android/net/wifi/p2p/package.html @@ -0,0 +1,68 @@ + + +

Provides classes to create peer-to-peer (P2P) connections with Wi-Fi Direct.

+ +

Using these APIs, you can discover and connect to other devices when each +device supports Wi-Fi Direct, then communicate over a speedy connection across distances much longer +than a Bluetooth connection. The primary class you need to work with is {@link +android.net.wifi.p2p.WifiP2pManager}, which you can acquire by calling {@link +android.app.Activity#getSystemService getSystemService(WIFI_P2P_SERVICE)}. The {@link +android.net.wifi.p2p.WifiP2pManager} includes APIs that allow you to:

+ + +

Several other interfaces and classes are necessary as well, such as:

+ + +

In order to use the Wi-Fi P2P APIs, your app must request the following user permissions:

+ + +

For example code, see the Wi-Fi +Direct Demo sample application.

+ +

Note: Not all Android-powered devices support Wi-Fi +Direct. If your application uses Wi-Fi Direct, declare so with a {@code <uses-feature>} +element in the manifest file:

+
+<manifest ...>
+    <uses-feature android:name="android.hardware.wifi.direct" />
+    ...
+</manifest>
+
+ + diff --git a/wifi/java/android/net/wifi/package.html b/wifi/java/android/net/wifi/package.html index 530313d..6f0d337 100644 --- a/wifi/java/android/net/wifi/package.html +++ b/wifi/java/android/net/wifi/package.html @@ -1,12 +1,29 @@ -Provides classes to manage Wi-Fi functionality on the device. +

Provides classes to manage Wi-Fi functionality on the device.

The Wi-Fi APIs provide a means by which applications can communicate with the lower-level wireless stack that provides Wi-Fi network access. Almost all information from the device supplicant is available, including the connected network's link speed, IP address, negotiation state, and more, plus information about other networks that are available. Some other API features include the ability to scan, add, save, terminate and initiate Wi-Fi connections.

-

Remember, not all Android devices are guaranteed to have Wi-Fi functionality.

+ +

Some APIs may require the following user permissions:

+ + +

Note: Not all Android-powered devices provide Wi-Fi functionality. +If your application uses Wi-Fi, declare so with a {@code <uses-feature>} +element in the manifest file:

+
+<manifest ...>
+    <uses-feature android:name="android.hardware.wifi" />
+    ...
+</manifest>
+
-- cgit v1.1