91-9990449935 0120-4256464 |
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
|