DevZone404

Fleet Driver Assistant - IN WORKS!

Comprehensive Android app for fleet drivers, fleet managers with ride analytics and safety features for both drivers and passangers

Fleet Driver Assistant

Fleet Driver Assistant

A comprehensive native Android application for fleet drivers and fleet managers, providing tools for shift management, vehicle tracking, ride data analysis, driver handbook, contacts, real-time ride monitoring and driver/passenger safety features.

Overview

Fleet Driver Assistant is an all-in-one solution for professional drivers working with ride-sharing services like Bolt. The application combines fleet management capabilities with advanced ride analytics, real-time monitoring, and safety features designed specifically for drivers.

Key Features

Calendar

Shift Management

Plan and manage work shifts with fleet coordination

BarChart

Ride Analytics

Import CSV data and visualize earnings, distance, and performance

Activity

Real-Time Monitoring

Floating overlay with live ride tracking and notifications

Shield

Safety Controls

Steering wheel integration for hands-free operation

Screenshots

Dashboard View Main dashboard with shift overview and quick access to all modules.

Analytics Dashboard Detailed ride statistics with interactive charts and graphs.

Real-Time Monitoring Floating overlay displaying current ride information.

Safety Features Steering wheel controls and emergency contacts.

Core Modules

Shift Management & Fleet Operations

  • Shift Scheduling - Plan and manage work shifts efficiently
  • Fleet Management - Coordinate with fleet managers and track vehicle assignments
  • Driver Card Module - Digital driver identification and credentials management
  • Driver Handbook - Access to driver documentation, guides, and best practices

Shift Management

Ride Data Analytics

  • CSV Import - Import ride history from Bolt CSV files for comprehensive analysis
  • Ride Statistics - Detailed statistics including earnings, distance, duration, and performance metrics
  • Analytics Dashboard - Visualize ride data with interactive charts and graphs
  • Raw Data Viewer - Inspect and verify imported CSV data

Analytics Module

Real-Time Monitoring

  • Floating Overlay - Persistent widget displaying real-time information about current rides
  • Notification Listener - Automatically captures ride data from notifications
  • Live Ride Tracking - Monitor ongoing rides with real-time updates

Real-Time Features

Vehicle & Safety Features

  • Steering Wheel Controls - Use vehicle's media buttons to safely switch between ride-sharing apps or go offline while driving
  • Emergency Contacts - Quick access to emergency and service contacts

Technical Stack

The application is built with modern Android development tools and follows Clean Architecture principles:

  • Language: Kotlin 1.9.20
  • Build System: Gradle 8.2
  • UI Framework: Jetpack Compose + Material Design 3
  • Architecture: Clean Architecture (Domain, Data, Presentation)
  • Dependency Injection: Koin 3.5.3
  • Database: SQLDelight 2.0.1 (KMM-ready)
  • Serialization: Kotlinx Serialization 1.6.2
  • Logging: Kermit 2.0.2
  • Minimum SDK: 26 (Android 8.0)
  • Target SDK: 34 (Android 14)

Architecture

Clean Architecture Layers

The application follows Clean Architecture principles with three main layers:

Domain Layer

  • Pure Kotlin code (no Android dependencies)
  • Contains business logic, entities, and use cases
  • Defines repository interfaces
  • KMM-ready for future iOS support

Data Layer

  • Implements repository interfaces
  • Manages data sources (local database, remote API)
  • Handles data persistence and synchronization
  • CSV file parsing and data import

Presentation Layer

  • Android-specific UI code (Jetpack Compose)
  • ViewModels for state management
  • Material Design 3 components
  • Navigation and screens
  • Floating overlay service

Application Modules

  1. Shift Manager Module - Shift scheduling and fleet management
  2. Driver Handbook Module - Driver documentation and guides
  3. Contacts Module - Emergency and service contacts
  4. Auto Assistant Module - Vehicle tracking and maintenance
  5. Driver Card Module - Driver identification and credentials
  6. Ride Analytics Module - Data import, statistics, and visualization
  7. Real-Time Monitor Module - Live ride tracking and notifications
  8. Safety Controls Module - Steering wheel integration for safe operation

CSV Data Import

The application imports ride data from Bolt CSV files with the following structure:

Column HeaderDescription
Czas zamówieniaDate and time the ride was ordered
Adres odbioruPickup address for the ride
Cena przejazduPrice of the ride
Opłata rezerwacyjnaBooking fee for the ride
Opłata drogowaToll fees incurred during the ride
Opłata za anulowanieCancellation fee, if any
NapiwekTip amount
WalutaCurrency of the transaction
Metoda płatnościPayment method used
Data płatnościDate and time of payment
OdległośćDistance of the ride in kilometers
StanStatus of the ride (e.g., Ukończone)

Safety Features

The application prioritizes driver safety with:

  • Hands-free controls via steering wheel media buttons
  • Floating overlay for minimal distraction
  • Quick app switching without touching the phone
  • Emergency contact access with one tap

Permissions

The application requires the following permissions:

  • SYSTEM_ALERT_WINDOW - Required for floating overlay feature
  • BIND_NOTIFICATION_LISTENER_SERVICE - Captures ride data from notifications
  • FOREGROUND_SERVICE - Ensures services run reliably in the background
  • PACKAGE_USAGE_STATS - Monitors foreground app information
  • QUERY_ALL_PACKAGES - Retrieves information about installed apps
  • INTERNET - Syncs data with remote servers
  • ACCESS_FINE_LOCATION - Tracks vehicle location and ride routes

Getting Started

  • Android Studio Hedgehog (2023.1.1) or later
  • JDK 17
  • Android SDK with API 34

Clone the repository:

git clone https://github.com/your-username/fleet-driver-assistant.git

Open in Android Studio:

  • Click on "Open an existing Android Studio project"
  • Navigate to the cloned repository and select it

Build and run the project:

./gradlew build
./gradlew installDebug

Or use Android Studio's Run button.

Development

Code Style

  • Follow Kotlin coding conventions
  • Use meaningful variable and function names
  • Document public APIs with KDoc
  • Keep functions small and focused

Logging

The application uses Kermit for logging:

import co.touchlab.kermit.Logger

Logger.d { "Debug message" }
Logger.i { "Info message" }
Logger.w { "Warning message" }
Logger.e { "Error message" }

Dependency Injection

Dependencies are managed with Koin:

// Define module
val myModule = module {
    single { MyRepository(get()) }
    factory { MyUseCase(get()) }
}

// Inject in ViewModel
class MyViewModel(
    private val useCase: MyUseCase
) : ViewModel()

Future Enhancements

  • iOS support via Kotlin Multiplatform Mobile (KMM)
  • Multi-platform ride service integration (Uber, Lyft, etc.)
  • Advanced route optimization
  • Automated expense tracking and tax reporting
  • Driver community features
  • Voice commands integration
  • Predictive analytics for earnings optimization

License

Proprietary - All rights reserved