A high-performance Android application designed to bridge the gap between your smartphone and the Bajaj Freedom instrument cluster via Bluetooth Low Energy (BLE). This project enables smart features like Turn-by-Turn navigation, media synchronization, call/SMS alerts, and ride analytics directly on your bike's display.
- Robust Serialized Queue: Enforces strict order of GATT operations with configurable inter-packet delays (80ms) to ensure stability on fragile bike hardware.
- Bi-directional Volume Sync: Real-time volume synchronization between Android system streams and the bike's hardware buttons.
- Heartbeat System: Periodic status frames keep the cluster updated with phone battery, signal strength, and call state.
- Media Metadata: Displays Song Title, Artist, and Album with progress tracking on the cluster.
- Call Alerts: Real-time Caller ID for incoming and active calls.
- Smart SMS/WhatsApp Alerts: Instant notification of messages with sender names.
- Notification Access: Uses Android Notification Listener Service for seamless background operation.
- Turn-by-Turn Integration: Parses Google Maps notifications to send maneuver icons and distances to the cluster.
- Dynamic Distance Scaling: Automatically converts and scales distances for the bike's display format.
- Ride Tracking: Logs distance, speed, and duration.
- Battery Guard: Monitors phone battery and alerts the rider when levels are low.
- Analytics Dashboard: In-app visualization of ride history and performance.
- Language: Kotlin
- Architecture: Service-based background processing
- Communication: Bluetooth Low Energy (BLE) / GATT
- Libraries:
- Timber (Logging)
- Google Play Services (Location/Maps)
- Android Jetpack (UI & Lifecycle)
- Clone the repository.
- Open in Android Studio.
- Build and install on an Android device (Physical device required for BLE).
- Grant Notification Access and Nearby Devices (Bluetooth) permissions.
- Pair with "Bajaj Freedom" cluster.
The Bajaj Freedom cluster uses a very limited Bluetooth buffer. This app implements a custom Serialized GATT Manager in BleService.kt to prevent packet collisions and write failures. Modification of the 80ms delay or the 26-byte packet size in CallFrame.kt is not recommended without extensive testing.
Developed for the Bajaj Freedom Community.