Home » Android bluetooth list paired devices example

Android bluetooth list paired devices example

by Online Tutorials Library

Android Bluetooth List Paired Devices Example

The getBoundedDevices() method of BluetoothAdapter class provides a set containing list of all paired or bounded bluetooth devices.

In this example, we are checking if the bluetooth is turned off, if yes then turn it on and list all the paired devices.

activity_main.xml

Drag one textview from the pallete, now the activity_main.xml file will like this:

File: activity_main.xml

Provide Permission

You need to provide following permissions in AndroidManifest.xml file.

The full code of AndroidManifest.xml file is given below.

File: AndroidManifest.xml

Activity class

Let’s write the code to provide the list of paired (bounded) bluetooth devices.

File: MainActivity.java


You need to run it on the real device (e.g. mobile) to test the application.

You may also like