The software to go with the MIDI-Bluetooth interface (I really need to think of a catchy name for this gadget…) is now available at Gitorious. It’s based on the BluetoothChat sample that comes with the Android SDK, and it consists of an activity for selecting a Bluetooth device to connect to and a service that manages the MIDI connection. I factored out a class for managing Bluetooth SPP connections that may be of independent interest. Client code sends MIDI messages by calling methods of the service, and it receives MIDI messages by implementing a MIDI receiver and registering it with the MIDI service.
In addition to the basic MIDI support, the repository also contains two sample projects that illustrate how to use the MIDI service. Moreover, Pd for Android now includes the btmidi repository as a submodule, and it comes with a utility class that automatically connects the MIDI functionality of libpd to the Bluetooth MIDI service. I put some effort into polishing and documenting the new classes. I’m pretty happy with them by now, but the code is only a few days old and should still be considered experimental. Like the code it is based on, the Bluetooth MIDI service is Apache licensed. Let the hacking begin!