blob: aada1fd4f4be952ce48c9aeecad3b21d411c8ff7 [file] [log] [blame]
Alexander Lucas969c2432012-06-13 10:57:22 -07001page.title=Connecting Devices Wirelessly
Scott Main7d711b12013-03-11 13:52:35 -07002page.tags="wifi","network","wireless"
Alexander Lucas969c2432012-06-13 10:57:22 -07003
4trainingnavtop=true
5startpage=true
Alexander Lucas969c2432012-06-13 10:57:22 -07006
7@jd:body
8
9
10<div id="tb-wrapper">
11<div id="tb">
12
13<h2>Dependencies and prerequisites</h2>
14<ul>
15 <li>Android 4.1 or higher</li>
16</ul>
17
18<h2>You should also read</h2>
19<ul>
Scott Mainf5e09702013-08-22 17:19:17 -070020 <li><a href="{@docRoot}guide/topics/connectivity/wifip2p.html">Wi-Fi P2P</a></li>
Alexander Lucas969c2432012-06-13 10:57:22 -070021</ul>
22
Scott Main64fedb72013-11-12 09:12:38 -080023</div>
24</div>
Alexander Lucas969c2432012-06-13 10:57:22 -070025
Scott Main64fedb72013-11-12 09:12:38 -080026<a class="notice-developers-video wide" href="http://www.youtube.com/watch?v=oi_ARV_I8Dc">
27<div>
28 <h3>Video</h3>
29 <p>DevBytes: Network Service Discovery</p>
Alexander Lucas969c2432012-06-13 10:57:22 -070030</div>
Scott Main64fedb72013-11-12 09:12:38 -080031</a>
Alexander Lucas969c2432012-06-13 10:57:22 -070032
33
34<p>Besides enabling communication with the cloud, Android's wireless APIs also
35enable communication with other devices on the same local network, and even
36devices which are not on a network, but are physically nearby. The addition of
37Network Service Discovery (NSD) takes this further by allowing an application to
38seek out a nearby device running services with which it can communicate.
39Integrating this functionality into your application helps you provide a wide range
40of features, such as playing games with users in the same room, pulling
41images from a networked NSD-enabled webcam, or remotely logging into
42other machines on the same network.</p>
43<p>This class describes the key APIs for finding and
44connecting to other devices from your application. Specifically, it
45describes the NSD API for discovering available services and the Wi-Fi
Scott Mainf5e09702013-08-22 17:19:17 -070046Peer-to-Peer (P2P) API for doing peer-to-peer wireless connections. This class also
47shows you how to use NSD and Wi-Fi P2P in
Alexander Lucas969c2432012-06-13 10:57:22 -070048combination to detect the services offered by a device and connect to the
49device when neither device is connected to a network.
50</p>
51<h2>Lessons</h2>
52
53<dl>
54 <dt><strong><a href="nsd.html">Using Network Service Discovery</a></strong></dt>
55 <dd>Learn how to broadcast services offered by your own application, discover
56 services offered on the local network, and use NSD to determine the connection
57 details for the service you wish to connect to.</dd>
Scott Mainf5e09702013-08-22 17:19:17 -070058 <dt><strong><a href="wifi-direct.html">Creating P2P Connections with Wi-Fi</a></strong></dt>
Alexander Lucas969c2432012-06-13 10:57:22 -070059 <dd>Learn how to fetch a list of nearby peer devices, create an access point
Scott Mainf5e09702013-08-22 17:19:17 -070060 for legacy devices, and connect to other devices capable of Wi-Fi P2P
Alexander Lucas969c2432012-06-13 10:57:22 -070061 connections.</dd>
Scott Mainf5e09702013-08-22 17:19:17 -070062 <dt><strong><a href="nsd-wifi-direct.html">Using Wi-Fi P2P for Service
Alexander Lucas969c2432012-06-13 10:57:22 -070063 Discovery</a></strong></dt>
64 <dd>Learn how to discover services published by nearby devices without being
Scott Mainf5e09702013-08-22 17:19:17 -070065 on the same network, using Wi-Fi P2P.</dd>
Alexander Lucas969c2432012-06-13 10:57:22 -070066</dl>
67