Skip to content

feat: Add satellite network access for API - #32

Open
aclaghorn wants to merge 1 commit into
MeshMapper:devfrom
aclaghorn:satellite
Open

feat: Add satellite network access for API#32
aclaghorn wants to merge 1 commit into
MeshMapper:devfrom
aclaghorn:satellite

Conversation

@aclaghorn

Copy link
Copy Markdown

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

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.

- 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

- 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+)
- First run crashed on the first network capability callback
  (EventSink.success() called off the main thread) — fixed and reverified;
  app now launches and runs stably with the callback registered
- Re-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)
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.

1 participant