Chapter 23
Background Operation and Battery
APRS is most useful when it keeps running: beaconing from the car, iGating, and catching messages. The app runs as an Android foreground service for this, shown by a permanent low-priority notification with the connection state.
#What keeps running
- The APRS-IS connection, keepalives and automatic reconnection.
- Beaconing and SmartBeaconing (GPS keeps running with the screen off).
- Reception on every RF interface (TCP KISS, Bluetooth, BLE, AGW, USB and the Audio TNC), iGating, message acks and retries.
- All alerts — messages (including replying from the notification), bulletins, weather, watch list and geo-fences.
- Saving data — station log, messages, weather, logs — every 10 minutes and when the service stops.
All of this runs in the service, so it carries on when the app's screen is closed or swiped away from the recent-apps list.
#Watchdogs and restarts
| Mechanism | Behaviour |
|---|---|
| Connection watchdog | Every 9 minutes, even in Doze: pings APRS-IS and reconnects if the connection has died. |
| Background job | Every 15 minutes when a network is available: restarts the service if Android killed it while you were connected. |
| Swipe-away | If you were connected, the service restarts itself a second later. |
| Reboot / update | If Auto-connect is on and you were connected, the service starts and connects to APRS-IS after the phone boots or the app is updated. |
| Exit / Disconnect | Choosing Exit or disconnecting turns all of the above off until you connect again. |
#GPS and microphone in the background
Android only lets an app use GPS or the microphone in the background if its background service says it needs them. The app's service does so whenever you have granted the location or microphone permission, so SmartBeaconing, proximity alerts and the audio TNC keep working with the screen off. Android allows this to be set up only while the app is on screen: after a reboot, GPS and the microphone are picked up the first time you open the app, and until then GPS positions may not arrive while the screen is off.
#Battery optimisation
Android and some manufacturers aggressively stop background apps. For dependable operation:
- Allow the app to ignore battery optimisation when asked (or Settings → Apps → G7JJF APRS Client → Battery → Unrestricted).
- On Samsung, remove it from Sleeping apps and Deep sleeping apps. On Xiaomi, enable Autostart and set No restrictions. On Huawei/Honor, set App launch to manual with all three switches on. On OnePlus/Oppo/Realme, allow background activity. The website dontkillmyapp.com has step-by-step guides for each make.
- Leave the app in the recent-apps list rather than swiping it away.
Battery use depends mostly on GPS and the screen. With the screen off, APRS-IS alone uses very little; continuous GPS for SmartBeaconing uses noticeably more, so plug in when mobile.