←../back_to_projects
⚡ 2024 Project·completed·Enterprise Field Operations

>_ How I Built a Resilient Geo-Tagged Field Reporting App for Low-Signal Operations

Native Android field reporting application built with Kotlin and MVVM: high-precision GPS coordinate locking, background image compression (3.8MB to ~400KB), and multipart REST API synchronization.

Fama Agent — architecture.hub
Camera & FusedGPS
Capture photo & high-accuracy coordinates
core
Media Compressor
Downscale & EXIF/Geo metadata binding
Kotlin ViewModel
MVVM state management & retry queue
Central REST API
Multipart upload & token authentication

Figure 1.0 — End-to-end architecture and data flow for Fama Agent

# The Journey Overview

An Android field-officer reporting app that sends photo evidence, accurate GPS locations, and activity reports straight to head office.

The Starting Point (Problem)

Field teams reported through chat groups: unstructured, hard to verify by location, and photos often failed to send on weak mobile signal.

Why This Matters (Outcome & Impact)

Provided a centralized reporting system with validated GPS coordinate evidence and automatic photo compression that saves data and stays stable on field networks.

# Phase 1: System Architecture & Pipeline

The system architecture is designed to be modular so each layer has a clearly isolated responsibility:

STAGE 01

Camera & FusedGPS

Capture photo & high-accuracy coordinates

STAGE 02

Media Compressor

Downscale & EXIF/Geo metadata binding

STAGE 03

Kotlin ViewModel

MVVM state management & retry queue

STAGE 04

Central REST API

Multipart upload & token authentication

Core Technical Deliverables

  • Field reports captured with text, camera photos, and GPS coordinates
  • Automatic on-device image compression before sending to the central REST API
  • MVVM architecture with solid loading, error, and retry state handling

# Phase 2: Engineering Decisions & Implementation

[Decision 01]Compressed bitmaps on a background thread before the multipart upload to prevent OutOfMemoryError and speed up delivery on weak 3G/4G networks.
[Decision 02]Used FusedLocationProviderClient with accuracy-radius validation so report coordinates are genuinely precise when submitted.
[Decision 03]Separated Activity/Fragment UI from networking logic with MVVM so uploads are not cancelled when the screen rotates.
ReportViewModel.kt
fun submitFieldReport(note: String, photo: File, loc: Location) {
  viewModelScope.launch {
    _uiState.value = ReportUiState.Uploading
    val compressed = imageCompressor.compressToMaxKb(photo, maxKb = 450)
    repository.uploadMultipart(note, compressed, loc.latitude, loc.longitude)
      .onSuccess { _uiState.value = ReportUiState.Success(it.reportId) }
      .onFailure { _uiState.value = ReportUiState.Error(it.message) }
  }
}

# Phase 3: Application Screens & Operational Workflow

1. Capture & Geo-Tagging

Evidence photos taken straight from the camera with automatic GPS coordinate locking.

2. Smart Upload Queue

Automatic image size compression and an upload status indicator for the central server.

3. Report History & Status

A list of submitted reports with time, location, and verification status.