Bluetooth Chat

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Internship Project Bluetooth Chat Application

RockyJagtiani TechnicalHead Suven Consultants

Introduction
This application allows two Android devices to carry out two-way text chat over Bluetooth. It demonstrates all the fundamental Bluetooth API capabilities, capabilities such as: Scanning for other Bluetooth devices Querying Q i the th l local l Bl Bluetooth t th adapter d t f for paired i d Bl Bluetooth t th d devices i Establishing RFCOMM channels/sockets Connecting to a remote device Transferring data over Bluetooth

RockyJagtiani TechnicalHead Suven Consultants

Process of Bluetooth Chat Application


This application first checks whether the Bluetooth of the device is in O /O mode. ON/OFF If the Bluetooth of the device is in OFF mode then application makes the request to enable the bluetooth bluetooth. After clicking on Connect a device on option menu the Application performs scanning for the devices which are in their range range. Then it displays the list of all devices in the range. Select the device with which one wants to do the chat. If the device connects then set up the chat session.

RockyJagtiani TechnicalHead Suven Consultants

Workflow of the project


Main xml Main.xml
Takestheview from

message xml message.xml


Displaysthechatting betweentwousers

device_list. xml
Takestheview from

Device_name. xml
Takesthenameof newdevice

BluetoothChat.java

DeviceListActivity.java

Thisisthemainactivity thatdisplaysthecurrent chatsession

BluetoothChat Application

Thisactivityappearsas dialogueanddisplayslist ofallpairedandnew devices

Thisactivitydoesalltheworkofsetting upandmanagingbluetooth chat

BluetoothChatService. java
RockyJagtiani TechnicalHead Suven Consultants 4

Correct and Incorrect cases in Bluetooth chat


Correct case :
First open the application. Click the Option Menu and then click on connect a device. Scan for new device if necessary. Select the device with which you want to chat. Once you are connected, you can perform bluetooth chat.

Incorrect Case :
If we try to chat if the device is not connected then the application will give the Toast message as You are not connected to the device!

RockyJagtiani TechnicalHead Suven Consultants

BluetoothAPIs
The application framework provides access to the Bluetooth functionality through the Android Bluetooth APIs. These APIs let applications wirelessly connect to other Bluetooth devices, enabling pointtopoint and multipoint wireless features. Android Bluetooth APIs are used to perform four major tasks setting up BT, finding devices, connecting g them and transferring g data.
RockyJagtiani TechnicalHead Suven Consultants 6

UI of Bluetooth chat application

RockyJagtiani TechnicalHead Suven Consultants

Thisapplicationcanbeusedin:
_____________________________________ _____________________________________ _____________________________________ _____________________________________ _____________________________________ _____________________________________ _____________________________________ _____________________________________ _____________________________________
RockyJagtiani TechnicalHead Suven Consultants 8

You might also like