Skip to content

feat: Add satellite network access for API - #32

Merged
MrAlders0n merged 1 commit into
MeshMapper:devfrom
aclaghorn:satellite
Sep 13, 2026
Merged

MrAlders0n merged 1 commit into
MeshMapper:devfrom
aclaghorn:satellite

Conversation

@aclaghorn

Copy link
Copy Markdown
Contributor

Motivation

Android gates satellite/constrained links behind an explicit app opt-in (https://developer.android.com/develop/connectivity/satellite/constrained-networks) — without it the OS never routes our traffic over a satellite connection even when it's the only option available. We want wardrive uploads and session auth to keep working (with adjusted pacing) when a user is off cellular/wifi coverage.

Actions Taken

  • Manifest: declared PROPERTY_SATELLITE_DATA_OPTIMIZED opt-in and ACCESS_NETWORK_STATE permission
  • Added MeshMapperNetworkService (native): registers a ConnectivityManager callback, reports constrained/satellite state over a new meshmapper/network_state EventChannel, wired into MainActivity's lifecycle
  • Added NetworkStateService (Dart): singleton exposing the live constrained/satellite state to the rest of the app
  • ApiQueueService: widen the wardrive upload batch interval from 15s to 60s while on a constrained network — fewer, larger batches instead of frequent small ones under high per-request latency
  • ApiService.requestAuth: widen the session/API-slot acquisition timeout from 10s to 30s while on a constrained network

Tests Taken

  • flutter analyze clean on all touched files
  • Built and ran the debug APK on a physical Pixel 10 Pro XL (Android 17 / API 37), which exercises the real satellite-detection path (API 36+)
  • Ran on the same device with a valid MESHMAPPER_API_KEY: BLE connect, #wardriving channel creation, auth + heartbeat (200, valid expires_at), zone check, RX logging with repeater SNR/path-length decode, and a queued wardrive upload (200) all completed successfully — confirms the connect -> slot-acquisition path works end-to-end
  • Confirmed: the constrained-network-specific behavior itself (60s batch interval, 30s auth timeout)

Screenshots

Android OS

Setting under Sim > T-mobile > Satellite Connectivity

Screenshot_20260909-094438

Meshmapper API connection over satellite

Notice the signal bars next to the battery indicates the session was created over a satellite connection.

screen-20260911-111102-1789150242832.mp4

@MrAlders0n MrAlders0n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased onto current dev, preserved the stale-connection auth retry, and added coverage for constrained-network upload pacing and auth timeouts. All Flutter tests pass, and Android and web debug builds succeed.

@MrAlders0n
MrAlders0n merged commit 5191765 into MeshMapper:dev Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants