Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code samples for Android Bluetooth programming [closed]

Tags:

I'm new to Android. I'm looking for some code samples for Android Bluetooth programming. Could you please post them for me? Any useful link would be appreciated.

like image 938
lawmeyian Avatar asked Apr 11 '11 10:04

lawmeyian


People also ask

What is Bluetooth API?

The app framework provides access to the Bluetooth functionality through Bluetooth APIs. These APIs let apps connect to other Bluetooth devices, enabling point-to-point and multipoint wireless features. Using the Bluetooth APIs, an app can perform the following: Scan for other Bluetooth devices.


1 Answers

I realize this is an old thread, but I thought I'd jot some notes. The Android Bluetooth example (already listed) has a bunch of issues (not the least of which is you need 2 Android devices to get it to function).

Take a look at the example at http://luugiathuy.com/2011/02/android-java-bluetooth/ where he is using BlueTooth on the Android device to hit a server (to do some robotics work).

Be aware of UUID issues (the way that BlueTooth decides what connection it can make is defined in the UUID), and check out http://www.avetana-gmbh.de/avetana-gmbh/produkte/doc/javax/bluetooth/UUID.html

Keep in mind that the 16 bits represented in the UUID (ie, 0x1101 for Serial Port) is misleading in that its really the least significant part and needs to be coded 0x00001101.

like image 153
Stuart Siegler Avatar answered Oct 02 '22 14:10

Stuart Siegler