Satellite: Android
Use an Android phone as an Otavi satellite for portable bird audio capture.
Platform: Android: a Capacitor app with in-app registration. Its satellite engine runs in native code phone 3.0.0: it records, filters, keeps the outbox, uploads and stays in touch with the hub with the screen on or off; the app's screens show what it does.
Device Requirements
- Android 8.0 (Oreo) or newer
- Working microphone
- GPS (for location-aware species filtering)
- Network connectivity (Wi-Fi or mobile data)
Getting the APK
Easiest path is to grab the latest release from your hub. After vhub-0.32.7+:
- Log in to the web UI as any tenant member.
- Open the Satellites page.
- Click Get mobile app vX.Y.Z in the page header. The browser downloads the APK; transfer it to the phone via USB, cloud drive, or any sideload path that works for you.
Hub admins can also pick an earlier version from Hub settings → Mobile (each row has a Download button).
Building locally
If you need a custom build (signed with your own keystore, different hub URL baked in at build time, etc.):
cd packages/mobile
./build-apk.sh
The script reads .env from the repo root (auto-derives OTAVI_MOBILE_HUB_URL from OTAVI_APP_FQDN and OTAVI_MOBILE_HUB_API_KEY from OTAVI_HUB_INTERNAL_API_KEY), builds a release-signed APK inside Docker (after the native engine's JVM tests and Android lint), and uploads it to the running hub as a new release. --no-upload keeps the APK aside, to try it on a phone before uploading it (Hub settings, Mobile); --dev [--version X.Y.Z] builds "Otavi dev" (app.otavi.satellite.dev), which installs beside the app, registers as a satellite of its own and is never uploaded.
Signing phone 1.16.0: the release keystore lives at ${OTAVI_APP_VOLUMES}/mobile/release.keystore, outside git, with its password in .env as OTAVI_MOBILE_KEYSTORE_PASSWORD. The script stages it into the build context and passes the password as a BuildKit secret, so neither ends up in an image layer. Generate it once with keytool (see .env.example) and back it up with the volume tree: the key is the app's identity, and without it no installed copy can ever be updated again.
Android Permissions
The app requests these permissions at startup:
| Permission | Why |
|---|---|
RECORD_AUDIO |
Capture audio from the microphone |
ACCESS_FINE_LOCATION |
GPS coordinates for geo-aware inference, read with the screen off while recording |
POST_NOTIFICATIONS |
The recording notification and its Stop button (Android 13+) |
It also asks to be left out of battery optimisation, so Android does not hold back its uploads with the screen off.
If permissions are denied, the app shows an "Open Settings" button to navigate to Android's app permission screen.
Setup Flow
1. Sign In
Enter your hub URL (e.g. https://otavi.example.com) and log in with your credentials.
If your account has MFA enabled (TOTP / passkeys), the app prompts for a 6-digit code after the password. Toggle to "Use backup code" if your authenticator is unavailable. Hub-side this calls /api/auth/login/mfa/{totp,backup}?returnToken=true hub 0.32.6; pre-phone 1.4.1 the mobile flow couldn't complete MFA at all.
After registration the app stores a satellite-scoped API key phone 1.4.0 instead of the session JWT. The key is long-lived and survives password changes or session expiry, so the satellite keeps working without re-login. Existing installs auto-exchange their stored JWT for an API key on first launch after upgrade.
2. Register Satellite
Choose a name for this satellite and select the team it belongs to. GPS location is acquired automatically after registration -- no need to enter coordinates during registration.
When the team already has phones you registered (or team phones you manage as an admin), the screen asks "Does this phone replace one registered before?" Pick the old phone after a reinstall or when moving to a new phone: this one carries on as it, with its settings (on-device BirdNET, filter thresholds, storage caps) and its history. The entry this install used until then, if any, is archived with its data. Answer "no" for a genuinely new device. A reinstall always gives the phone a new device ID, so without this answer it would start a new entry on the team's defaults.
3. GPS Requirement
Before recording starts, the app requires a GPS fix or manually entered coordinates. This is needed because BirdNET uses location + date to filter its species list for regionally plausible species.
If GPS is unavailable:
- A yellow "GPS Location Required" prompt appears
- Retry GPS: attempt auto-acquisition again
- Open Settings: enter latitude/longitude manually
4. Record
Once GPS is set, the app connects to the hub via MQTT (WebSocket over TLS). The app starts in a paused state -- tap the recording status bar to begin capturing 3-second audio chunks. It starts recording by itself when Record on launch is on in Settings, or when an app update interrupted a recording (since 1.26.0). Audio is filtered on the phone with an RMS silence gate followed by YAMNet (TensorFlow Lite, in the native engine); filter thresholds and per-category drop settings are received from the hub.
Recording Screen
On the Live tab, the listening circle starts and pauses recording: tap it. The app starts paused, unless Start recording on launch is on or an update interrupted a recording.
While recording, the Live tab shows a scrolling live spectrogram phone 1.11.0 of the audio being captured, 0–12 kHz bottom-to-top. It streams only while the app is on screen.
A badge shows where identification runs: On-device AI (phone 1.12.0, set the satellite to device inference mode at the hub) or Hub AI. In device mode the phone classifies chunks locally with a bundled BirdNET model and uploads only detections; otherwise it uploads audio for the hub to analyze. In device mode it also analyses the window from the middle of each chunk to the middle of the next phone 3.2.0, where a call cut in two by the chunk boundary is whole, and uploads it as a chunk of its own when it holds a species neither chunk heard (on two test sessions this added a fifth to a quarter more detections, and several species). That is a second BirdNET analysis for every chunk. A "Hub-managed" chip appears when an admin has locked the config. Bird names follow the phone's language.
| Stat | Description |
|---|---|
| Chunks Sent | Audio chunks uploaded to hub |
| Filtered | Chunks rejected by adaptive filter |
| Last Sent | Time since last successful upload |
| Hub | Connection status (Connected / Connecting / Offline) |
| GPS | Fix status (Fixed / Acquiring / Not set) |
| Name | Satellite display name |
Below the chunk audit, two collapsible cards:
- Chunks (N): per-chunk pipeline audit, last 16 statuses as colored dots (sent / live / silence / low-bird / category-excluded). Expand for the full list with timestamps + RMS / bird-prob values.
- Détections (N) phone 1.3.0: live feed of detections from chunks this phone uploaded. REST backfill from
/api/detections?satelliteId=<self>&limit=50on mount, then live MQTT prepend via the new/detectiontopic. Each row shows species (common + scientific), confidence %, timestamp, and badges for rare / first-of-day / first-of-season.
Settings Page
Settings is a full page (not a popup), accessible from the recording screen.
Satellite Name
Editable field that syncs to the hub. Visible on the Satellites page in the web UI. Read-only, with a padlock, when its team (or the hub) does not let satellites rename themselves phone 2.1.0; whoever manages it can still rename it on its page in the web UI.
Settings, edited in place phone 2.1.0
Every setting the phone may set for itself is a row: the choice list first offers what it inherits, such as Team default (On) or Hub default (30 s), then its own values; a number is typed in and applies on Enter or when leaving the field, with ↺ to take the inherited value again. A change goes to the hub at once and the row shows what then applies. A row locked by the team or the hub is read-only with a padlock, and the whole screen is read-only while only admins can change its settings.
Location
Use GPS and Refresh every are hub settings like the others phone 2.1.0 (hub, team and satellite values, with locks); a choice made on the phone before 2.1.0 moved to the hub as this phone's own value.
| Control | Description |
|---|---|
| Use GPS | Take the position from the phone's GPS, read every Refresh every |
| Latitude / Longitude + Save | A fixed position, while the GPS is off |
| Map | Tap to place the phone: this turns the GPS off (unless locked on) and fixes the position there |
A fixed position set here is kept by the hub, and one set on the hub (Set… on the satellite's page) reaches the phone while its GPS does not give one.
::: tip Battery Savings For a stationary phone, turn off Use GPS and place it on the map. GPS polling is the largest battery drain after screen-on. :::
Keep Screen On
On by default phone 2.3.3: the screen stays on while the app is open (the Capacitor keep-awake plugin), to watch the Live screen. Recording and uploads carry on with it off: see Recording With the Screen Off below.
The Hub From the Phone phone 2.3.0
The phone is the satellite; the hub's web app shows the rest. Hub in the app's header opens it in a viewer drawn over the app phone 2.3.1: the close button, or Android's back once there is no hub page to go back to, returns to the app. The app stays on screen underneath, so recording and uploads carry on, and the screen stays on while the hub is open when the app keeps it on phone 2.3.2. Open on the hub on a species sheet goes to that species' page, and This phone on the hub in Settings, Satellite info, to this phone's satellite page; the privacy page opens the same way. The viewer has its own sign-in, remembered by the app (not Chrome's): sign in there once, with the code from your authenticator app for two-factor (passkeys don't work in it), and Remember this device skips the code for 30 days. Links to other sites, and downloads such as exports and reports, open in the browser.
Silent While Recording phone 2.2.0
While the phone records, notification sounds, vibrations and ringing calls would land in the recordings. With this on, the app switches on its own Do Not Disturb rule, Otavi recording (alarms only: alarms still ring), while the microphone is open: on when recording starts or a profile window opens, off when it pauses, stops or the window closes phone 3.1.0. Turning the rule off leaves your own Do Not Disturb and other rules as they were; a rule left on by an app the system killed is turned off at the next launch. The first time, the switch opens Android's Do Not Disturb access list: allow Otavi there and come back to the app. Needs Android 10 or later. The rule appears in the system's Do Not Disturb settings, where it can be turned off or deleted; turning the switch off removes it.
The app never vibrates on a detection, and its recording notification updates silently.
Verbose Chunk Logging
Toggle to enable detailed per-chunk log entries for diagnostics (filter decisions, RMS values, SNR).
Recording Profile
The profile decides when the phone records phone 3.1.0, from sunrise and sunset where the phone is (the profiles are listed in Satellites). Choose it here, or on the satellite's page on the hub; only admins can change it while the satellite's settings are theirs only. The Monitor tab shows the profile, the day's sunrise and sunset and the next windows, computed on the phone from its own position. Outside the windows the microphone closes: see Recording With the Screen Off.
Audio Filter Settings
All filter settings are received from the hub via MQTT and applied locally, and the last configuration is kept on the phone for the next start. The on-device pipeline is RMS silence gate + YAMNet (per-category bird-likelihood scoring with the bundled TensorFlow Lite model). Tenant-wide defaults and per-satellite overrides for yamnet_min_bird_prob and the five drop_*_at_satellite toggles are configured in the hub.
Satellite Info
- Satellite ID -- UUID (read-only)
- Hub -- hub URL (read-only)
Unregister
Type UNREGISTER to confirm. This:
- Stops recording
- Disconnects from the hub
- Clears the saved configuration
- Does not delete the satellite record on the hub
To re-register: sign in again and register. On the same install the device ID reconnects to the existing satellite record; after a reinstall, pick the old phone when asked whether this one replaces it.
Recording With the Screen Off
While recording, a foreground service keeps the phone's native engine running phone 3.0.0 and shows a notification with the latest detection (or the session's counts) and a Stop button. The engine records, filters, runs BirdNET when on-satellite inference is on, uploads, sends heartbeats and telemetry, reads the GPS at the hub's interval and answers live listening and log requests, with the screen off, another app in front, or the app swiped away from the recent apps.
- Stop in the notification ends the session, like the pause button in the app.
- A session starts only from the app on screen: Android lets an app open the microphone in the background only that way. After the phone restarts, or when Android ends the app, recording resumes at the next opening when Record on launch is on.
- The GPS is read with the screen off when the app has the location permission.
- Outside its recording profile's windows phone 3.1.0 the session stays on and only the microphone closes. The notification reads "Off schedule · records again at 18:18"; the phone stays connected, sends its heartbeats (
scheduled_off, with the time the next window opens) and answers the hub; the GPS is read every 15 minutes at most, and once more 5 minutes before the next window. The microphone opens again when the window does, screen off or not. The session must stay on for that: Android lets an app open the microphone in the background only from a session started on screen. - Recordings waiting for the network stay in the phone's outbox (the Storage card) within the hub's size and age limits, and go out oldest first when the connection is back, each with the position where it was recorded.
Some phone makers stop background apps whatever the notification says. If the hub shows the phone as quiet while its screen is off, set Otavi's battery use to Unrestricted in Android's settings (Apps, Otavi, Battery).
Only one app hears the microphone at a time: while another app records with its screen in front (a call, a voice recorder, another bird app), Android gives Otavi silence, and it does the same while microphone access is off in Android's quick settings. The phone notices phone 3.2.0: it uploads nothing meanwhile, its notification asks whether another app is using the microphone, and the hub shows it in Error with that reason. It hears again as soon as the other app lets go. To compare Otavi with another app, run them on two phones.
External Microphones
A USB-C microphone plugged into the phone records instead of the built-in one phone 3.4.0: Android routes the recording to it, and the log names the inputs Android lists and the one in use ("microphone open at 48000 Hz on the USB device ..."). Plugging a USB or wired microphone in or removing it during a session opens the microphone again on the input Android picks then, at once, even while the phone was waiting to retry; a Bluetooth headset does not move the recording.
A USB microphone whose stream stalls sends the same few audio buffers over and over, then zeros; BirdNET can hear a siren in such a loop. The phone drops those chunks instead of uploading them: its notification says the microphone sends no sound and the hub shows the phone in Error (mic_no_signal). A stall often ends by itself, so the phone waits four chunks before it opens the same microphone again; an external microphone that stalls again after that is left for the phone's own microphone.
An external microphone that sends nothing but zeros may be dead, and Android may keep routing recordings to it after it was unplugged, even across a restart; every app then records silence, phone calls included. After two such chunks in a row phone 3.4.1 the phone asks Android for its own built-in microphone instead (the log says "asking for the phone's own microphone"), and tries Android's choice again every 15 minutes, or at once when a USB or wired microphone is plugged in or removed: a wireless receiver whose transmitter was off, or microphone access switched off for a while, gives zeros too. If the phone's own microphone then sends zeros as well, the phone reports no sound rather than another app. Other apps stay on the dead input: if they hear nothing, plug the external microphone in and unplug it again, or restart the phone. Zeros on the phone's own microphone otherwise keep their meaning above: another app has it, or microphone access is off.
Team Alerts
An alert rule of the team with Team phones on phone 3.3.0 shows each alert as a notification on the team's phones that are connected when it fires: the rule's name, the alert's text and the satellite that heard it. The notifications have a channel of their own, Team alerts, without sound or vibration (the phone is often recording); Android's notification settings for Otavi can turn the channel off. Tapping one opens the app.
Heartbeat
The app sends a heartbeat at a configurable interval (default 30 seconds) via MQTT QoS 1, screen on or off, recording or paused. The interval is a hub setting and applies as soon as it changes. This keeps the satellite showing as "online" on the hub even when all audio chunks are filtered. The heartbeat reports the current state:
recording-- actively capturingpaused-- user pressed Pausescheduled_off-- outside its recording profile's windows, withnextChangeAt, when the next opens phone 3.1.0error-- witherrorsaying why: the microphone gives only silence (mic_silenced) or no sound at all (mic_no_signal), or failed to open three times in a row (mic_failed); the phone keeps trying
From phone 3.1.0 it also names the profile the phone applies (recordingProfile).
Telemetry
Reported every 60 seconds:
| Metric | Source |
|---|---|
| Battery level | Android's battery status |
| Storage free | Free space on the app's storage |
| Network latency | Round trip of a small message to the broker |
| Uptime | Time since the app's engine started |
CPU temperature is not available on mobile -- shown as "--" on the hub.
Log Viewer
Collapsible panel on the Monitor tab. It shows the engine's log, the same lines Get logs on the satellite's page in the web UI receives, screen off included:
- Microphone, filter decisions (every chunk with Verbose chunk logging) and uploads
- Broker connection changes and configurations received
- GPS readings
- Errors and warnings, from the engine and the app's screens
The last 500 lines are shown; they are also written to the app's storage (two files of 256 KB at most) and read back when the engine starts phone 3.4.0, so the lines before a restart or a reboot stay readable. Use "Copy All" to export, "Clear" to reset (both the screen and the files).
Troubleshooting
| Symptom | Solution |
|---|---|
| "Another app is using the microphone" | Close the other audio app; the engine opens the microphone again by itself. |
| "No sound from the microphone" | Check that microphone access is on in Android's quick settings, and unplug any external microphone. If other apps hear nothing either, restart the phone. |
| "Android did not let the recording start" | Start recording with the app on screen. |
| Hub shows the phone quiet while its screen is off | The phone's maker restricts background apps: set Otavi's battery use to Unrestricted (Apps, Otavi, Battery). |
| "Microphone permission not granted" | Tap "Open Settings" and enable the microphone permission. |
| Satellite shows offline | Check hub connection status. Verify hub URL and credentials. |
| GPS unavailable | Enable location services. Try "Use GPS" in Settings. Some indoor locations have no GPS signal. |
| App not installed (update fails) | The APK was built with a different signing key. Uninstall first, then install the new APK. |
| Duplicate satellites | A reinstall gives the phone a new device ID. Unregister, register again and pick the old phone when asked whether this one replaces it: the duplicate is archived with its data. |
Updates on the phone
The app checks the hub for a newer APK at launch, every 6 hours, when it comes back to the screen (at most every 15 minutes, phone 3.3.2) and when the hub nudges it after an upload. A pending release shows as a banner. On Wi-Fi while charging the phone downloads and verifies it by itself, so the banner's button becomes "Install now" and only the Android install sheet is left; on mobile data nothing is fetched until you tap. A release uploaded with "force update" (the rollback path) shows a blocking dialog instead of a banner. What's new in the banner lists the changes of every release since the one the phone runs phone 3.1.0 (the release notes, in English; the dialog opens it straight away). Installing an update restarts the app: if it was recording, it records again as soon as it reopens (tap "Open" at the end of the install).
Species sheet
The Live screen shows every bird the phone's recordings were found to hold phone 3.2.0, as soon as the hub (or the phone's own BirdNET) has analysed them. One whose species has not been heard often enough yet under the team's rule (Team settings, Detections: by default twice within 30 minutes, or once at high confidence) is shown dimmed with a Tentative badge, and loses the badge when a later hearing confirms it; the hub counts, alerts on and reports confirmed detections only, and deletes tentative ones after a day.
Tap the latest detection or a species in today's list on the Live screen to open what the hub knows about it: its photos, swipe to see more, each credited, the times this phone heard it today, the traits and the Wikipedia summary. Names and texts follow the phone's language; where the hub has no text in that language, it shows the English one. The sheet needs the hub to be reachable; answers are kept until the app restarts.
Photos show whole, at their own proportions. Tap one to see it full screen: pinch or double-tap to zoom where your fingers are, drag to look around, swipe sideways for the next photo and down to close; a tap hides or shows the credit and the close button. Zooming in downloads the full-resolution copy of that photo (1 to 4 MB for most), once per viewing and only when it weighs 8 MB or less; larger scans zoom on the lighter copy already on screen. The back button closes the full-screen photo, then the sheet.