summaryrefslogtreecommitdiffstats
path: root/docs/html/training
diff options
context:
space:
mode:
authorScott Main <smain@google.com>2013-08-22 17:19:17 -0700
committerScott Main <smain@google.com>2013-08-22 17:41:10 -0700
commitf5e0970c471d8bb3775febe4d1fb422a337c462c (patch)
treed5c61084147ace4daa05600677b94bce07b89ce8 /docs/html/training
parent2a4f71df86e42f14705df452b74358e0b7970815 (diff)
downloadframeworks_base-f5e0970c471d8bb3775febe4d1fb422a337c462c.zip
frameworks_base-f5e0970c471d8bb3775febe4d1fb422a337c462c.tar.gz
frameworks_base-f5e0970c471d8bb3775febe4d1fb422a337c462c.tar.bz2
replace instances of Wi-Fi Direct with Wi-Fi P2P
Change-Id: I21cb06e27e98c428b4f3f4ac72e759f61607e468
Diffstat (limited to 'docs/html/training')
-rw-r--r--docs/html/training/connect-devices-wirelessly/index.jd14
-rw-r--r--docs/html/training/connect-devices-wirelessly/nsd-wifi-direct.jd16
-rw-r--r--docs/html/training/connect-devices-wirelessly/wifi-direct.jd39
-rw-r--r--docs/html/training/training_toc.cs4
4 files changed, 36 insertions, 37 deletions
diff --git a/docs/html/training/connect-devices-wirelessly/index.jd b/docs/html/training/connect-devices-wirelessly/index.jd
index f27b9c3..db79abe 100644
--- a/docs/html/training/connect-devices-wirelessly/index.jd
+++ b/docs/html/training/connect-devices-wirelessly/index.jd
@@ -17,7 +17,7 @@ startpage=true
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/connectivity/wifip2p.html">Wi-Fi Direct</a></li>
+ <li><a href="{@docRoot}guide/topics/connectivity/wifip2p.html">Wi-Fi P2P</a></li>
</ul>
@@ -37,8 +37,8 @@ other machines on the same network.</p>
<p>This class describes the key APIs for finding and
connecting to other devices from your application. Specifically, it
describes the NSD API for discovering available services and the Wi-Fi
-Direct&trade; API for doing peer-to-peer wireless connections. This class also
-shows you how to use NSD and Wi-Fi Direct in
+Peer-to-Peer (P2P) API for doing peer-to-peer wireless connections. This class also
+shows you how to use NSD and Wi-Fi P2P in
combination to detect the services offered by a device and connect to the
device when neither device is connected to a network.
</p>
@@ -49,13 +49,13 @@ device when neither device is connected to a network.
<dd>Learn how to broadcast services offered by your own application, discover
services offered on the local network, and use NSD to determine the connection
details for the service you wish to connect to.</dd>
- <dt><strong><a href="wifi-direct.html">Connecting with Wi-Fi Direct</a></strong></dt>
+ <dt><strong><a href="wifi-direct.html">Creating P2P Connections with Wi-Fi</a></strong></dt>
<dd>Learn how to fetch a list of nearby peer devices, create an access point
- for legacy devices, and connect to other devices capable of Wi-Fi Direct
+ for legacy devices, and connect to other devices capable of Wi-Fi P2P
connections.</dd>
- <dt><strong><a href="nsd-wifi-direct.html">Using Wi-Fi Direct for Service
+ <dt><strong><a href="nsd-wifi-direct.html">Using Wi-Fi P2P for Service
Discovery</a></strong></dt>
<dd>Learn how to discover services published by nearby devices without being
- on the same network, using Wi-Fi Direct.</dd>
+ on the same network, using Wi-Fi P2P.</dd>
</dl>
diff --git a/docs/html/training/connect-devices-wirelessly/nsd-wifi-direct.jd b/docs/html/training/connect-devices-wirelessly/nsd-wifi-direct.jd
index 5e276de..8dc5fd9 100644
--- a/docs/html/training/connect-devices-wirelessly/nsd-wifi-direct.jd
+++ b/docs/html/training/connect-devices-wirelessly/nsd-wifi-direct.jd
@@ -1,4 +1,4 @@
-page.title=Using Wi-Fi Direct for Service Discovery
+page.title=Using Wi-Fi P2P for Service Discovery
parent.title=Connecting Devices Wirelessly
parent.link=index.html
@@ -26,23 +26,23 @@ trainingnavtop=true
<p>The first lesson in this class, <a href="nsd.html">Using Network Service
Discovery</a>, showed you
how to discover services that are connected to a local network. However, using
-Wi-Fi Direct&trad; Service Discovery allows you to discover the services of nearby devices directly,
-without being connected to a network. You can also advertise the services
+Wi-Fi Peer-to-Peer (P2P) Service Discovery allows you to discover the services of nearby devices
+directly, without being connected to a network. You can also advertise the services
running on your device. These capabilities help you communicate between apps,
even when no local network or hotspot is available.</p>
<p>While this set of APIs is similar in purpose to the Network Service Discovery
APIs outlined in a previous lesson, implementing them in code is very different.
This lesson shows you how to discover services available from other devices,
-using Wi-Fi Direct&trade;. The lesson assumes that you're already familiar with the
-<a href="{@docRoot}guide/topics/connectivity/wifip2p.html">Wi-Fi Direct</a> API.</p>
+using Wi-Fi P2P. The lesson assumes that you're already familiar with the
+<a href="{@docRoot}guide/topics/connectivity/wifip2p.html">Wi-Fi P2P</a> API.</p>
<h2 id="manifest">Set Up the Manifest</h2>
-<p>In order to use Wi-Fi Direct, add the {@link
+<p>In order to use Wi-Fi P2P, add the {@link
android.Manifest.permission#CHANGE_WIFI_STATE}, {@link
android.Manifest.permission#ACCESS_WIFI_STATE},
and {@link android.Manifest.permission#INTERNET}
-permissions to your manifest. Even though Wi-Fi Direct doesn't require an
+permissions to your manifest. Even though Wi-Fi P2P doesn't require an
Internet connection, it uses standard Java sockets, and using these in Android
requires the requested permissions.</p>
@@ -244,7 +244,7 @@ provided by the method hints at the problem. Here are the possible error values
and what they mean</p>
<dl>
<dt> {@link android.net.wifi.p2p.WifiP2pManager#P2P_UNSUPPORTED}</dt>
- <dd> Wi-Fi Direct isn't supported on the device running the app.</dd>
+ <dd> Wi-Fi P2P isn't supported on the device running the app.</dd>
<dt> {@link android.net.wifi.p2p.WifiP2pManager#BUSY}</dt>
<dd> The system is to busy to process the request.</dd>
<dt> {@link android.net.wifi.p2p.WifiP2pManager#ERROR}</dt>
diff --git a/docs/html/training/connect-devices-wirelessly/wifi-direct.jd b/docs/html/training/connect-devices-wirelessly/wifi-direct.jd
index b8ed664..98435c6 100644
--- a/docs/html/training/connect-devices-wirelessly/wifi-direct.jd
+++ b/docs/html/training/connect-devices-wirelessly/wifi-direct.jd
@@ -1,12 +1,6 @@
-page.title=Connecting with Wi-Fi Direct
-parent.title=Connecting Devices Wirelessly
-parent.link=index.html
+page.title=Creating P2P Connections with Wi-Fi
trainingnavtop=true
-previous.title=Using Network Service Discovery
-previous.link=nsd.html
-next.title=Service Discovery with Wi-Fi Direct
-next.link=nsd-wifi-direct.html
@jd:body
@@ -21,25 +15,30 @@ next.link=nsd-wifi-direct.html
<li><a href="#fetch">Fetch the List of Peers</a></li>
<li><a href="#connect">Connect to a Peer</a></li>
</ol>
+ <h2>You should also read</h2>
+ <ul>
+ <li><a href="{@docRoot}guide/topics/connectivity/wifip2p.html">Wi-Fi Peer-to-Peer</a></li>
+ </ul>
</div>
</div>
-<p>The Wi-Fi Direct&trade; APIs allow applications to connect to nearby devices without
-needing to connect to a network or hotspot. This allows your application to quickly
+<p>The Wi-Fi peer-to-peer (P2P) APIs allow applications to connect to nearby devices without
+needing to connect to a network or hotspot (Android's Wi-Fi P2P framework complies with the Wi-Fi
+Alliance's Wi-Fi Direct&trade; certification program). Wi-Fi P2P allows your application to quickly
find and interact with nearby devices, at a range beyond the capabilities of Bluetooth.
</p>
<p>
-This lesson shows you how to find and connect to nearby devices using Wi-Fi Direct.
+This lesson shows you how to find and connect to nearby devices using Wi-Fi P2P.
</p>
<h2 id="permissions">Set Up Application Permissions</h2>
-<p>In order to use Wi-Fi Direct, add the {@link
+<p>In order to use Wi-Fi P2P, add the {@link
android.Manifest.permission#CHANGE_WIFI_STATE}, {@link
android.Manifest.permission#ACCESS_WIFI_STATE},
and {@link android.Manifest.permission#INTERNET}
-permissions to your manifest. Wi-Fi Direct doesn't require an internet connection,
+permissions to your manifest. Wi-Fi P2P doesn't require an internet connection,
but it does use standard Java sockets, which require the {@link
android.Manifest.permission#INTERNET} permission.
-So you need the following permissions to use Wi-Fi Direct.</p>
+So you need the following permissions to use Wi-Fi P2P.</p>
<pre>
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
@@ -59,13 +58,13 @@ So you need the following permissions to use Wi-Fi Direct.</p>
</pre>
<h2 id="receiver">Set Up a Broadcast Receiver and Peer-to-Peer Manager</h2>
-<p>To use Wi-Fi Direct, you need to listen for broadcast intents that tell your
+<p>To use Wi-Fi P2P, you need to listen for broadcast intents that tell your
application when certain events have occurred. In your application, instantiate
an {@link
android.content.IntentFilter} and set it to listen for the following:</p>
<dl>
<dt>{@link android.net.wifi.p2p.WifiP2pManager#WIFI_P2P_STATE_CHANGED_ACTION}</dt>
- <dd>Indicates whether Wi-Fi Peer-To-Peer (P2P) is enabled</dd>
+ <dd>Indicates whether Wi-Fi P2P is enabled</dd>
<dt>{@link android.net.wifi.p2p.WifiP2pManager#WIFI_P2P_PEERS_CHANGED_ACTION}</dt>
<dd>Indicates that the available peer list has changed.</dd>
<dt>{@link android.net.wifi.p2p.WifiP2pManager#WIFI_P2P_CONNECTION_CHANGED_ACTION}</dt>
@@ -80,7 +79,7 @@ public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
- // Indicates a change in the Wi-Fi Peer-to-Peer status.
+ // Indicates a change in the Wi-Fi P2P status.
intentFilter.addAction(WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION);
// Indicates a change in the list of available peers.
@@ -101,7 +100,7 @@ android.net.wifi.p2p.WifiP2pManager}, and call its {@link
android.net.wifi.p2p.WifiP2pManager#initialize(Context, Looper, WifiP2pManager.ChannelListener) initialize()}
method. This method returns a {@link
android.net.wifi.p2p.WifiP2pManager.Channel} object, which you'll use later to
-connect your app to the Wi-Fi Direct Framework.</p>
+connect your app to the Wi-Fi P2P framework.</p>
<pre>
&#64;Override
@@ -126,7 +125,7 @@ method, add a condition to handle each P2P state change listed above.</p>
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION.equals(action)) {
- // Determine if Wifi Direct mode is enabled or not, alert
+ // Determine if Wifi P2P mode is enabled or not, alert
// the Activity.
int state = intent.getIntExtra(WifiP2pManager.EXTRA_WIFI_STATE, -1);
if (state == WifiP2pManager.WIFI_P2P_STATE_ENABLED) {
@@ -177,7 +176,7 @@ The best place to do this is the {@link android.app.Activity#onResume()} and
<h2 id="discover">Initiate Peer Discovery</h2>
-<p>To start searching for nearby devices with Wi-Fi Direct, call {@link
+<p>To start searching for nearby devices with Wi-Fi P2P, call {@link
android.net.wifi.p2p.WifiP2pManager#discoverPeers(WifiP2pManager.Channel,
WifiP2pManager.ActionListener) discoverPeers()}. This method takes the
following arguments:</p>
@@ -218,7 +217,7 @@ formed.</p>
<h2 id="fetch">Fetch the List of Peers</h2>
<p>Now write the code that fetches and processes the list of peers. First
implement the {@link android.net.wifi.p2p.WifiP2pManager.PeerListListener}
-interface, which provides information about the peers that Wi-Fi Direct has
+interface, which provides information about the peers that Wi-Fi P2P has
detected. The following code snippet illustrates this.</p>
<pre>
diff --git a/docs/html/training/training_toc.cs b/docs/html/training/training_toc.cs
index c99fc96..d44d7d4 100644
--- a/docs/html/training/training_toc.cs
+++ b/docs/html/training/training_toc.cs
@@ -405,7 +405,7 @@ include the action bar on devices running Android 2.1 or higher."
<a href="<?cs var:toroot ?>training/connect-devices-wirelessly/index.html"
description=
"How to find and connect to local devices using Network Service
- Discovery and Wi-Fi Direct in order to create peer-to-peer connections."
+ Discovery and how to create peer-to-peer connections with Wi-Fi."
>Connecting Devices Wirelessly</a>
</div>
<ul>
@@ -414,7 +414,7 @@ include the action bar on devices running Android 2.1 or higher."
</a>
</li>
<li><a href="<?cs var:toroot ?>training/connect-devices-wirelessly/wifi-direct.html">
- Connecting with Wi-Fi Direct
+ Creating P2P Connections with Wi-Fi
</a>
</li>
<li><a href="<?cs var:toroot ?>training/connect-devices-wirelessly/nsd-wifi-direct.html">