Chapter 16
Bluetooth, NFC, Networks, and Wi-Fi
What's in this Chapter?
Managing Bluetooth devices and discoverability mode
Discovering remote Bluetooth devices
Communicating over Bluetooth
Monitoring Internet connectivity
Monitoring Wi-Fi and network details
Configuring Wi-Fi and scanning for access points
Transferring data using Wi-Fi Direct
Scanning NFC tags
Transferring data using Android Beam
This chapter begins to explore Android's hardware communications APIs by examining the Bluetooth, network, Wi-Fi, and Near Field Communication (NFC) packages.
Android offers APIs to manage and monitor your Bluetooth settings: to control discoverability, to discover nearby Bluetooth devices, and to use Bluetooth as a proximity-based, peer-to-peer transport layer for your applications.
A full network and Wi-Fi package is also available. Using these APIs, you can scan for hotspots, create and modify Wi-Fi configuration settings, monitor your Internet connectivity, and control and monitor Internet settings and preferences. The introduction of Wi-Fi Direct offers a peer-to-peer solution for communicating between devices using Wi-Fi.
Android 2.3 (API level 9) introduced support for NFC, including the support for reading smart tags, and Android 4.0 (API level 14) added the ability to communicate with other NFC-enabled Android devices using Android Beam.
Using Bluetooth
Bluetooth is a communications protocol designed for short-range, low-bandwidth peer-to-peer communications.
Using the Bluetooth ...
Get Professional Android 4 Application Development, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.