- Overview
- Features
- Tech Stack
- Project Structure
- How to Run
- How to Connect & Chat
- Protocol Design
- Permissions
- Demo Video
- Assignment Info
QuickChat is an Android application that lets two smartphones communicate directly over Bluetooth Classic (RFCOMM) β completely offline, no Wi-Fi or mobile data needed. It works like a standard messaging app (WhatsApp-style UI) but over a direct Bluetooth connection.
Built as part of the CNDC assignment at SZABIST Islamabad, the app covers device discovery, real-time messaging, file transfer with progress tracking, delivery receipts, and message timestamps.
| Feature | Status |
|---|---|
| π Device Discovery β scan & list nearby Bluetooth devices | β Done |
| π¬ Real-Time Text Messaging β send & receive instantly | β Done |
| π File Transfer β images, PDFs with live progress bar | β Done |
| π’ Connection Status β connected / disconnected / scanning indicators | β Done |
| π Message Timestamps β time shown on every message bubble | β Done |
| β Delivery Receipts β sender notified when message is received | β Done |
| Component | Technology |
|---|---|
| Language | Kotlin |
| Platform | Android (Native) |
| Bluetooth | Bluetooth Classic β RFCOMM / SPP |
| Min SDK | API 21 (Android 5.0+) |
| IDE | Android Studio |
| UI | XML Layouts |
bluetooth-chat-application/
βββ .idea/ β Android Studio project settings
βββ app/ β Main application module
β βββ src/
β βββ main/
β βββ java/com/example/quickchat/
β β βββ MainActivity.kt β Chat UI + device discovery
β β βββ BluetoothService.kt β Connection + data transfer
β βββ res/
β β βββ layout/
β β β βββ activity_main.xml β Main UI layout
β β βββ drawable/
β β βββ bg_input.xml β Input field background
β βββ AndroidManifest.xml β Permissions & app config
βββ gradle/ β Gradle wrapper files
βββ .gitignore β Git ignored files
βββ README.md β Project documentation
βββ build.gradle.kts β Project build config
βββ gradle.properties β Gradle properties
βββ gradlew β Gradle wrapper (Linux/Mac)
βββ gradlew.bat β Gradle wrapper (Windows)
βββ settings.gradle.kts β Project settings
βββ protocol design document.pdf β Protocol design document
βββ quickchat.jpeg β App screenshot
- Android Studio Hedgehog or later
- Two Android devices (API 21+) with Bluetooth support
- USB cable for initial installation
1. Clone the repository
git clone https://github.com/YOUR_USERNAME/QuickChat-Bluetooth.git
cd QuickChat-Bluetooth2. Open in Android Studio
File β Open β Select the project folder
3. Sync Gradle
Android Studio will prompt automatically β click Sync Now
4. Build & Install on both devices
Run βΆ β Select your device β OK
Repeat for the second device.
- Open QuickChat on both devices
- On Device A β tap Scan to search for nearby devices
- On Device B β make sure Bluetooth is ON and device is discoverable
- On Device A β tap Device B's name from the list to connect
- Once connected β type a message and tap Send
βοΈ - To send a file β tap the π attachment button and pick a file
π See the full Protocol Design Document for byte-level details, flow diagrams, and error handling.
QuickChat uses a custom binary protocol over RFCOMM. Every packet has a 5-byte header followed by a variable-length payload:
[ TYPE (1 byte) ][ LENGTH (4 bytes) ][ PAYLOAD (LENGTH bytes) ]
| Type Code | Packet Name | Purpose |
|---|---|---|
0x01 |
TEXT_MESSAGE | A chat text message |
0x02 |
FILE_START | Announces a file transfer with metadata |
0x03 |
FILE_CHUNK | One 4 KB piece of the file |
0x04 |
FILE_END | End of file + MD5 checksum for verification |
0x05 |
ACK | Delivery acknowledgement (success/failure) |
0x06 |
PING | Keep-alive signal |
The following permissions are required and requested at runtime on Android 12+:
| Permission | Required For | Android Version |
|---|---|---|
BLUETOOTH |
Basic Bluetooth operations | All versions |
BLUETOOTH_ADMIN |
Device discovery & pairing | All versions |
BLUETOOTH_CONNECT |
Connecting to paired devices | Android 12+ |
BLUETOOTH_SCAN |
Scanning for nearby devices | Android 12+ |
ACCESS_FINE_LOCATION |
Bluetooth device discovery | Android 6+ |
READ_EXTERNAL_STORAGE |
Picking files to send | All versions |
πΉ Watch Demo Video
The demo shows:
- Two real Android devices connecting over Bluetooth
- Sending and receiving text messages in real time
- Transferring a file with the progress bar
| Field | Detail |
|---|---|
| Student | Niha Hawas |
| Program | BSCS-6B |
| Institute | SZABIST Islamabad |
| Course | CNDC β Computer Networks & Data Communications |
| Assignment | Bluetooth Chat Application |
| Year | 2026 |
Developed by: Niha Hawas
- π GitHub: github.com/nihahawas
- πΌ LinkedIn: linkedin.com/in/nihahawas45
