Download the New LearnVern Android App and enter Lucky Draw to win Free Certificate
If you are facing any issue in playing video please use Firefox browser.
Bonding with Bluetooth devices in Android
In today's video our topic is Bonding with Bluetooth Devices in Android.
Once you enable the Bluetooth, you can get a list of paired device by calling getBondedDevices() method. It returns a set of bluetooth devices
There are different methods of bluetooth adaptor class like enable(), isEnabled(),
setName(String name), getState(), startDiscovery() etc...
We need to use one Client Server Mechanism to transfer files from one bluetooth to another.
The server and client are considered connected to each other when they each have a connected Bluetooth Socket on the same RFCOMM channel. At this point each device can obtain input and output streams and data transfer can begin.
The service device and the client device each obtain the required Bluetooth socket in different ways. The server will receive it when an incoming connection is accepted. The client will receive it when it opens an RFCOMM channel to the server.
The purpose of the server socket is to listen for incoming connection requests and when one is accepted, provide a connected BluetoothSocket. If you over data communication task then disconnect it.
The steps for connecting Server Socket are as follows :
Have a friend to whom you would want to share this course?