A modern, cross-platform Android application powering real-time peer-to-peer WebRTC file transfers.
Overview • Demo • Features • Tech Stack • Getting Started
ConnectX Android is a beautifully crafted mobile application designed to instantly receive and send files from the ConnectX Web App using WebRTC-based peer-to-peer (P2P) file transfer.
No cloud storage, no intermediaries, and no waiting. Simply scan a QR code generated on the web client, and your Android device will establish a secure, direct connection for blistering-fast data transfer. Built using Jetpack Compose and modern Android architectures, ConnectX acts as the perfect companion client to our high-performance Spring Boot signaling backend.
Experience the seamless connection process and lightning-fast transfer across platforms:
| Web View | Mobile View |
![]() |
![]() |
Sharing files instantly and wirelessly via WebRTC data channel from both perspectives.
|
|
|
|
| Component | Technology | Description |
|---|---|---|
| Language | Kotlin 1.9+ | Primary language powering the Android client. |
| UI Framework | Jetpack Compose | Modern declarative UI toolkit for Android. |
| P2P Engine | WebRTC | Google's WebRTC library for raw P2P data channels. |
| Vision/Camera | CameraX & ML Kit | High-performance, low-latency barcode and QR scanning. |
| Networking | OkHttp WebSockets | Persistent duplex connection to the Signaling Server. |
| Serialization | Kotlinx Serialization | Fast, native JSON parsing for signaling payloads. |
The ConnectX Android app communicates seamlessly with the Web Client and Backend Infrastructure:
- Open Web Client: User opens ConnectX Web and generating a receiving QR code.
- Scan using Android: User opens this app, grants camera permission, and scans the screen.
- Parse QR Data: ML Kit reads the
ReceiverTokenandSessionId. - WebSocket Handshake: App establishes a WebSocket connection to the Spring Boot Signaling service.
- WebRTC Negotiation: The app and web client exchange
OFFER,ANSWER, andICE_CANDIDATES. - P2P Transfer: A direct DataChannel opens, and binary file chunks stream directly to device storage.
Follow these steps to run the Android project on your local machine using Android Studio.
Running the Project
-
Clone the Repository:
git clone https://github.com/Mahir-Agarwal/ConnectX-Android-Client.git cd ConnectX-Android-Client -
Configure Network Environment: Open
app/src/main/java/com/example/connectxapp/common/MobileEnv.kt(or your build config) and point theBASE_URLto your active backend signaling server.object MobileEnv { const val BASE_URL = "http://192.168.x.x:8080" // or your deployed backend URL }
-
Build and Deploy: Open the project in Android Studio Hedgehog (or newer). Wait for Gradle sync, then connect a physical Android device (requires Android 7.0+ / API 24). Click Run.
Note: Camera features and WebRTC P2P typically do not test well on emulators. A physical device is strongly recommended.
m:\ConnectX-MobileApp
├── app/src/main/java/com/example/connectxapp/
│ ├── network/ # WebSocket connections & JSON Signaling Models
│ ├── storage/ # MediaStore Scoped Storage logic (FileWriterUtil)
│ ├── webrtc/ # WebRtcClient, ICE Candidate generation & DataChannels
│ └── ui/ # Compose UI Elements
│ ├── components/ # Glassmorphic Buttons, Loaders, and Cards
│ ├── theme/ # Material 3 Color Schemes & Typography
│ ├── ScanScreen.kt # CameraX & ML Kit QR Code Scanner
│ └── TransferScreen.kt# Active WebRTC File Receiving UI
├── Demo/ # Application Demo GIFs
└── build.gradle.kts # Dependency configurationsEngineered and Developed by Mahir Agarwal

