A comprehensive cycling computer fitness app that combines Flutter and Kotlin to provide an extensive cycling activity tracking experience.
This is a project developed as part of Integration Workshop 3, demonstrating the integration between Flutter (user interface) and Kotlin (background services and database). The app allows cyclists to track their activities in real-time, view detailed statistics, and analyze traveled routes.
- Detailed statistics: Duration, distance traveled, average/maximum speed
- Interactive charts: Visualization of speed, cadence, power, and altitude
- Complete history: Access to all previous activities
- Interactive map: Route visualization using OpenStreetMap
- Elevation data: Altitude analysis along the route
- BLE Integration: Native Android Bluetooth LE server implementation for sensor connectivity
- Local database: Efficient storage using SQLite on Android with statistics caching
- Audio & Haptic Feedback: Button interaction vibration patterns
- Seed data: Sample data for demonstration and testing
- Platform: Android support
- State Management: Riverpod + Hooks
- UI Components:
fl_chart: Interactive chartssyncfusion_flutter_charts: Advanced charting libraryflutter_map: Maps with OpenStreetMapgoogle_nav_bar: Bottom navigation bar
- Utilities:
geolocator: Location servicespermission_handler: Permission managementshared_preferences: Local storagevibration: Device vibration
- Database: SQLite with Room
- BLE: Native Android Bluetooth LE implementation
- Services: Background processing and statistics calculations
- MethodChannel: Flutter β Android communication for database operations and BLE
- Platform Channels: Data exchange between platforms
- Async Operations: Background processing for performance optimization
- Flutter SDK 3.38.3 or higher
- Dart SDK 3.10.1 or higher
- Gradle 9.2.1+
- JDK 25+
- Android Studio with Android SDK 36 Baklava
- Android device or emulator
-
Clone the repository:
git clone https://github.com/ViDaProjects/BeForBike_App.git cd BeForBike_App -
Install dependencies:
flutter upgrade flutter pub upgrade flutter pub get
-
Configure Android environment:
- Open the project in Android Studio
- Sync Gradle
- Configure a virtual device or connect a physical device
-
Run the application in device:
flutter run --debug --hot
# Run all tests
flutter test
# Run tests with coverage
flutter test --coverage
# Run code analysis
flutter analyze# Build for Android APK
flutter build apk --release
# Build for Android AAB (Google Play)
flutter build appbundle --releasebicycle-computer-app/
βββ android/ # Native Android code
β βββ app/src/main/kotlin/com/beforbike/app/
β βββ database/ # SQLite database and models
β βββ MainActivity.kt # Android entry point and MethodChannel
β βββ BleServerService.kt # BLE GATT server implementation
β βββ GattProfile.kt # BLE service definitions
βββ lib/ # Flutter code
β βββ core/ # Utilities and configurations
β β βββ utils/ # Audio service, color utils
β βββ data/ # Data layer (repositories, APIs)
β βββ domain/ # Business rules (entities, repositories)
β βββ presentation/ # User interface
β βββ common/ # Shared components and widgets
β βββ home/ # Home screen and map view
β βββ my_activities/ # Activity list and details
β βββ settings/ # Settings screen
β βββ statistics/ # Statistics and charts
βββ test/ # Unit tests
βββ pubspec.yaml # Flutter dependencies
The app follows a clean architecture with clear separation of responsibilities:
- Presentation Layer: Flutter widgets with Riverpod for state management
- Domain Layer: Business entities and repository contracts
- Data Layer: Repository implementations and Android communication
- Platform Layer: Native Android code for heavy services
- Collection: BLE sensors β Android SQLite database (background processing)
- Processing: Statistics calculations with caching on Android
- Presentation: Flutter reads cached data via MethodChannel
- Visualization: Responsive interface with interactive charts and maps
