Once you enable the Bluetooth, you can get a list of paired devices by calling getBondedDevices() method. This constant is used for receiving information about each device that is discovered This constant will notify that Bluetooth state has been changed ![]() This constant is used for turn on discovering of bluetooth ![]() Intent turnOn = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE) Īpart from this constant, there are other constants provided the API, that supports different tasks. In order to enable the Bluetooth of your device, call the intent with the following Bluetooth constant ACTION_REQUEST_ENABLE. Its syntax is given below.īA = BluetoothAdapter.getDefaultAdapter() Create an object of this calling by calling the static method getDefaultAdapter(). Android platform includes support for the Bluetooth framework that allows a device to wirelessly exchange data with other Bluetooth devices.Īndroid provides Bluetooth API to perform these different operations.Ĭonnect to other devices through service discoveryĪndroid provides BluetoothAdapter class to communicate with Bluetooth. Among many ways, Bluetooth is a way to send or receive data between two different devices.
0 Comments
Leave a Reply. |