Alexander Lucas | 969c243 | 2012-06-13 10:57:22 -0700 | [diff] [blame] | 1 | page.title=Connecting Devices Wirelessly |
Scott Main | 7d711b1 | 2013-03-11 13:52:35 -0700 | [diff] [blame] | 2 | page.tags="wifi","network","wireless" |
Alexander Lucas | 969c243 | 2012-06-13 10:57:22 -0700 | [diff] [blame] | 3 | |
| 4 | trainingnavtop=true |
| 5 | startpage=true |
Alexander Lucas | 969c243 | 2012-06-13 10:57:22 -0700 | [diff] [blame] | 6 | |
| 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 Main | f5e0970 | 2013-08-22 17:19:17 -0700 | [diff] [blame] | 20 | <li><a href="{@docRoot}guide/topics/connectivity/wifip2p.html">Wi-Fi P2P</a></li> |
Alexander Lucas | 969c243 | 2012-06-13 10:57:22 -0700 | [diff] [blame] | 21 | </ul> |
| 22 | |
Scott Main | 64fedb77 | 2013-11-12 09:12:38 -0800 | [diff] [blame] | 23 | </div> |
| 24 | </div> |
Alexander Lucas | 969c243 | 2012-06-13 10:57:22 -0700 | [diff] [blame] | 25 | |
Scott Main | 64fedb77 | 2013-11-12 09:12:38 -0800 | [diff] [blame] | 26 | <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 Lucas | 969c243 | 2012-06-13 10:57:22 -0700 | [diff] [blame] | 30 | </div> |
Scott Main | 64fedb77 | 2013-11-12 09:12:38 -0800 | [diff] [blame] | 31 | </a> |
Alexander Lucas | 969c243 | 2012-06-13 10:57:22 -0700 | [diff] [blame] | 32 | |
| 33 | |
| 34 | <p>Besides enabling communication with the cloud, Android's wireless APIs also |
| 35 | enable communication with other devices on the same local network, and even |
| 36 | devices which are not on a network, but are physically nearby. The addition of |
| 37 | Network Service Discovery (NSD) takes this further by allowing an application to |
| 38 | seek out a nearby device running services with which it can communicate. |
| 39 | Integrating this functionality into your application helps you provide a wide range |
| 40 | of features, such as playing games with users in the same room, pulling |
| 41 | images from a networked NSD-enabled webcam, or remotely logging into |
| 42 | other machines on the same network.</p> |
| 43 | <p>This class describes the key APIs for finding and |
| 44 | connecting to other devices from your application. Specifically, it |
| 45 | describes the NSD API for discovering available services and the Wi-Fi |
Scott Main | f5e0970 | 2013-08-22 17:19:17 -0700 | [diff] [blame] | 46 | Peer-to-Peer (P2P) API for doing peer-to-peer wireless connections. This class also |
| 47 | shows you how to use NSD and Wi-Fi P2P in |
Alexander Lucas | 969c243 | 2012-06-13 10:57:22 -0700 | [diff] [blame] | 48 | combination to detect the services offered by a device and connect to the |
| 49 | device 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 Main | f5e0970 | 2013-08-22 17:19:17 -0700 | [diff] [blame] | 58 | <dt><strong><a href="wifi-direct.html">Creating P2P Connections with Wi-Fi</a></strong></dt> |
Alexander Lucas | 969c243 | 2012-06-13 10:57:22 -0700 | [diff] [blame] | 59 | <dd>Learn how to fetch a list of nearby peer devices, create an access point |
Scott Main | f5e0970 | 2013-08-22 17:19:17 -0700 | [diff] [blame] | 60 | for legacy devices, and connect to other devices capable of Wi-Fi P2P |
Alexander Lucas | 969c243 | 2012-06-13 10:57:22 -0700 | [diff] [blame] | 61 | connections.</dd> |
Scott Main | f5e0970 | 2013-08-22 17:19:17 -0700 | [diff] [blame] | 62 | <dt><strong><a href="nsd-wifi-direct.html">Using Wi-Fi P2P for Service |
Alexander Lucas | 969c243 | 2012-06-13 10:57:22 -0700 | [diff] [blame] | 63 | Discovery</a></strong></dt> |
| 64 | <dd>Learn how to discover services published by nearby devices without being |
Scott Main | f5e0970 | 2013-08-22 17:19:17 -0700 | [diff] [blame] | 65 | on the same network, using Wi-Fi P2P.</dd> |
Alexander Lucas | 969c243 | 2012-06-13 10:57:22 -0700 | [diff] [blame] | 66 | </dl> |
| 67 | |