Wednesday, May 2, 2012

Andriod Example - Bluetooth Show Paired Devices

Here is a very simple example that I thought might be helpful to someone. I have included the four files that have content that is key to setting up the application.

The program checks to see if the device has bluetooth. If the device does and it isn’t turned on the program will prompt the user to turn it one. Once bluetooth is running it lists the paired devices.

You should be able to create a new Android project in eclipse and then copy the code included below into the appropriate file.

As the SDK Emulator doesn’t emulate bluetooth this example will not run in the emulator.

This example is built upon the information in the Bluetooth Dev Guide on the Android Developers site and the Android-Java Bluetooth on Samsung Galaxy post on

Below the code attachments you will find a screen capture of what it looks like running on my Acer A100.

If you have any suggestions or questions please post them as comments.
goes in <ProjectRoot>\src\com\example\showpaired\

goes in <ProjectRoot>\res\values\

goes in <ProjectRoot>\res\layout\

goes in <ProjectRoot>

Screen Capture from Acer A100


  1. The code highlighting is done using SyntaxHighlighter which is maintained by Alex Gorbatchev and can be found at
  2. This example is built upon the work of others. I post it here not as an example of original work but rather as a complete working example for reference. If I didn't appropriately credit you for your work please let me know and I will add you.


Anonymous said...

Thanks, good example... :)

Unknown said...

Can you tell me how to send a file using bluetooth.

digitalhack said...


This isn't something I have done and at the present time I am without a functioning Android device.


Unknown said...

can you send me that project? I couldn't work , i am new on Android.