WHAT YOU WILL LEARN IN THIS CHAPTER:
How to use the various APIs within the Game Kit framework for Bluetooth communications
How to look for peer Bluetooth devices using the
How to send and receive data from a connected device
How to implement Bluetooth voice chat
The iPad comes with built-in Bluetooth functionality, allowing it to communicate with other Bluetooth devices, such as Bluetooth headsets, iPhone, iPod touch, and iPad. This chapter shows you how to write iPad applications that use Bluetooth to communicate with another device, performing tasks such as sending and receiving text messages, as well as voice chatting. Daunting as it may sound, Bluetooth programming is actually quite simple using the iPhone SDK. All the Bluetooth functionalities are encapsulated within the Game Kit framework.
To test the concepts covered in this chapter, you need two devices — iPads, iPhones (3G or 3GS), or iPod touches (second generation or later) running iPhone OS 3.0 or later.
One of the neat features available in the iPhone SDK is the Game Kit framework, which contains APIs that allow communications over a Bluetooth network. You can use these APIs to create peer-to-peer games and applications with ease. Unlike other mobile platforms, using Bluetooth as a communication channel in the iPad is way easier than expected. In this section, you will learn how to build a simple application that allows two iPad ...