Skip to content

Implement mobile application for SCIoT client #23

@lbedogni

Description

@lbedogni

Problem
Currently, the SCIoT system only supports Raspberry Pi and ESP32 clients for edge inference and offloading. Mobile devices (smartphones/tablets) represent a significant use case for edge AI applications but lack native client support.

Motivation

  • Ubiquity: Mobile devices are widely available and have significant computational power
  • Use Cases: Real-time image recognition, video analysis, sensor fusion
  • Platform Coverage: iOS and Android represent the majority of edge computing devices
  • Camera Integration: Built-in high-quality cameras and sensors

Proposed Implementation

Phase 1: Architecture & Design

  • Design mobile-specific architecture considering battery constraints
  • Evaluate cross-platform frameworks (Flutter/React Native vs native Swift/Kotlin)
  • Define API compatibility layer for existing server endpoints
  • Design power-efficient inference scheduling

Phase 2: Core Features

  • Camera Integration: Real-time video capture with configurable resolution/FPS
  • Model Loading: Support for TensorFlow Lite / Core ML / ONNX models
  • Inference Pipeline: On-device inference with layer-wise profiling
  • Offloading Client: HTTP/MQTT communication with edge server
  • Network Monitoring: Adaptive offloading based on latency and battery level

Phase 3: Platform-Specific Implementation

iOS (Swift/SwiftUI)

  • AVFoundation for camera capture
  • Core ML for on-device inference
  • Vision framework for preprocessing
  • Network framework for adaptive connectivity

Android (Kotlin/Jetpack Compose)

  • CameraX API for camera management
  • TensorFlow Lite for inference
  • ML Kit for preprocessing
  • OkHttp/Retrofit for networking

Phase 4: User Interface

  • Live camera preview with inference overlay
  • Real-time metrics dashboard (latency, FPS, battery usage)
  • Offloading strategy selector (always local / always remote / adaptive)
  • Model selection and configuration

Phase 5: Testing & Optimization

  • Battery consumption profiling
  • Network efficiency testing (Wi-Fi, 4G/5G)
  • Comparative analysis vs Raspberry Pi client
  • User experience testing

Technical Considerations

  • Power Management: Background inference throttling, adaptive frame rate
  • Model Optimization: Quantization for mobile deployment
  • Connectivity: Handle network transitions gracefully (Wi-Fi ↔ cellular)
  • Privacy: On-device processing options, data retention policies
  • Compatibility: Support iOS 14+ and Android 8+

Deliverables

  • Mobile architecture design document
  • iOS application (Swift/SwiftUI)
  • Android application (Kotlin/Jetpack Compose)
  • Mobile-specific configuration management
  • Battery and performance benchmarks
  • User documentation and setup guide

Dependencies

Files/Components to Create

  • src/mobile/ios/ - iOS application source
  • src/mobile/android/ - Android application source
  • src/mobile/shared/ - Shared business logic (if using cross-platform approach)
  • docs/MOBILE_SETUP.md - Mobile development and deployment guide

Estimated Effort: Large (6-8 weeks for both platforms)

Priority: Medium (expands platform coverage, significant user value)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions