This application allows two Android devices to carry out two-way text chat over
Bluetooth. It demonstrates all the fundamental Bluetooth API capabilites, such as:
(1) Scanning for other Bluetooth devices
(2) Querying the local Bluetooth adapter for paired Bluetooth devices
(3) Establishing RFCOMM channels/sockets
(4) Connecting to a remote device
(5) Transfering data over Bluetooth
It uses below code (Apache License, Version 2.0) with minimum modification: https://github.com/googlesamples/android-BluetoothChat