Android Bluetooth List Paired Devices ExampleThe 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.xmlDrag one textview from the pallete, now the activity_main.xml file will like this: File: activity_main.xml Provide PermissionYou need to provide following permissions in AndroidManifest.xml file. The full code of AndroidManifest.xml file is given below. File: AndroidManifest.xml Activity classLet'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.Next TopicAndroid wifi Example |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India