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.
Bluetooth is a communications protocol designed for short-range, low-bandwidth peer-to-peer communications.
Using the Bluetooth ...