Skip to content

paulmathew/CallInspector

Repository files navigation

🕵️‍♂️ CallInspector

Android CI

Android Kotlin Compose Hilt Status

CallInspector is a modular, production-grade diagnostic engine designed to validate Android device hardware and network integrity before critical video calls.

It goes beyond simple API checks by implementing low-level socket probes, automated hardware analysis, and mathematical scoring models to grade device health.


🚀 Key Features

📡 Network Diagnostic Engine

Instead of relying on simple HTTP checks, CallInspector implements a custom networking stack:

  • TCP Socket Probes: Measures raw TCP handshake latency to bypass ICMP restrictions.
  • Jitter Calculation: Computes variance between packet arrivals in real-time.
  • Throughput Testing: Streams data from a dedicated CDN to measure true bandwidth.
  • Packet Loss Estimation: Detects dropped socket connections.

📸 Automated Sensor Validation

  • CameraX ImageAnalysis: Uses background threads to analyze pixel luminosity buffers (YUV_420_888) to mathematically verify if the lens is functioning or covered.
  • Microphone Amplitude: Visualizes raw audio input levels using MediaRecorder.

📦 Dynamic Feature Module

Demonstrates advanced modularization capabilities:

  • Service Status Dashboard: A completely separate module (:dynamic_status_module) delivered via Play Feature Delivery.
  • Architecture: Implements the "Logic in Base, UI in Dynamic" pattern to solve Hilt dependency graph constraints while keeping the APK size optimized.

📊 Health Scoring Algorithm

  • Aggregates 15+ metrics into a weighted score (0-100).
  • Generates a final "Device Grade" (A+ to F).
  • Logic verified by Unit Tests using Mockk.

🛠 Tech Stack

Category Library / Technology Usage
Language Kotlin 100% Codebase
UI Jetpack Compose Material3 Design System
Architecture MVI / Clean Architecture Unidirectional Data Flow
Injection Hilt Dependency Injection
Concurrency Coroutines + Flow Reactive Data Streams
Networking Retrofit + Java Sockets API & Latency Probes
Hardware CameraX Hardware Abstraction
Testing Mockk + Turbine Unit Testing Flows & Logic
Persistence Room Local SQLite Database

🏗 Architecture & Modularization

The project follows a scalable MVVM + Clean Architecture pattern, designed to separate concerns and ensure testability.

Module Structure

The app is modularized by feature to support Dynamic Delivery and Strict Dependency Boundaries.

:app (Base Module)
 ├── core/              # Shared Logic (Network, Dispatchers, Utils)
 ├── diagnostics/       # Feature: Hardware Tests (Mic, Cam, Socket Probe)
 ├── navigation/        # App Navigation Graph
 └── status/            # Feature Logic: Service Status (ViewModel/Repo)

:dynamic-status-module (Dynamic Feature)
 └── presentation/      # UI: Service Status Screen (Compose)
     └── Loaded via Reflection at runtime to reduce initial APK size.

📜 Audit History & Persistence

  • Local Database (Room): Automatically persists every diagnostic run for compliance and historical comparison.
  • Structured Reporting: Saves granular details (latency, jitter, sensor pass/fail status) alongside the final grade.
  • Offline Access: Review past audit results without network connectivity.

🏗 Architecture Overview

The app follows strict Clean Architecture principles to ensure testability and separation of concerns.

graph TD
    subgraph "Base Module (:app)"
        UI["Presentation Layer<br>(ViewModels + Compose)"]
        Domain["Domain Layer<br>(UseCases + Interfaces)"]
        Data["Data Layer<br>(Repositories + Implementations)"]
    end

    subgraph "Dynamic Feature (:dynamic_status_module)"
        DFM["Dynamic UI<br>(Status Dashboard)"]
    end

    %% Architecture Flow
    UI --> Domain
    Domain --> Data
    
    %% Dynamic Feature Logic (Logic in Base, UI in Dynamic)
    DFM -->|Depends on| UI
    UI -.->|Loads via Reflection| DFM

    %% Data Sources
    Data --> Remote["Remote Data<br>(TCP Sockets / Retrofit)"]
    Data --> Hardware["Device Hardware<br>(CameraX / Mic)"]
    Data --> Local["Persistence<br>(Room Database)"]
Loading

📸 Screenshots

Dashboard Diagnostics
Status Check & Features Real-time Socket Analysis
Device Capabilities Service Status (DFM)
Hardware Audit Dynamic Feature Module
Final Report
Automated Scoring Engine

About

Android Device & Network Health Validator. Checks Mic, Speaker, Camera, and Jitter/Packet Loss using Kotlin & Jetpack Compose.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages