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.
Drag one textview from the pallete, now the activity_main.xml file will like this:
You need to provide following permissions in AndroidManifest.xml file.
The full code of AndroidManifest.xml file is given below.
Let's write the code to provide the list of paired (bounded) bluetooth devices.
You need to run it on the real device (e.g. mobile) to test the application.
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week