-
DeviceListActivity: the main (first) activity of your app. It lists the Bluetooth devices with which your Android device is paired and connects to the device you select.
-
CommunicationsTask: an asynchronous task (i.e., thread) for managing communications with the device to which you've connected.
-
CommunicationsActivity: an abstract class that supports reading from and writing to the server via its mBluetoothConnection object.
An example subclass, MyCommunicationsActivity, provides a seek-bar (slider) and text widget to send and receive values from your server.
The easiest way to try out this app is with the Python Bluetooth server that we developed to work with it. This server uses the same simple protocol (period-delimited messages) as the code in the MyCommunicationsActivity class.