Android
Foreground Service
When you enter a hub, CrewTalk starts a foreground service that keeps the audio relay connection alive:
- Persistent notification: Shows "CrewTalk — Connected to [hub name]"
- Service type:
FOREGROUND_SERVICE_MICROPHONE— enables PTT in the background - Wake lock:
PARTIAL_WAKE_LOCKprevents the CPU from sleeping and dropping the connection - The service starts automatically when you enter a hub and stops when you leave
Battery Optimization
Android's battery optimization can kill background apps. CrewTalk requests exemption:
- On first hub entry, a dialog asks to exempt CrewTalk from battery optimization
- Tap Allow to ensure uninterrupted background operation
- If you denied the prompt, enable it manually:
Open Android Settings
Go to your device's Settings > Apps > CrewTalk.
Find Battery Settings
Tap Battery (or Battery optimization).
Set to Unrestricted
Select Unrestricted (or Don't optimize).
Without battery optimization exemption, Android may kill CrewTalk's background process after 10-15 minutes of inactivity. This is the #1 cause of unexpected disconnections. If crew members report dropping off, check this setting first.
What the Notification Shows
The persistent notification displays:
- Title: "CrewTalk"
- Content: "Connected to [hub name]"
- Icon: CrewTalk mic icon
- The notification cannot be dismissed while connected — this is an Android requirement for foreground services
iOS
Background Audio
iOS uses background audio modes to keep the connection alive:
- The app registers for
audio,voip,fetch, andremote-notificationbackground modes - The audio session keeps the app alive while there's an active audio connection
- iOS manages the background lifecycle — the app may be suspended after extended inactivity
iOS Limitations
iOS is more restrictive about background execution:
- The app may be suspended by iOS if it's been in the background too long without audio activity
- When suspended, the auto-reconnect triggers when you return to the app
- Background audio works best when there's regular PTT activity on the channel
Token Refresh
Firebase auth tokens expire after 1 hour. CrewTalk proactively refreshes tokens every 45 minutes to prevent authentication failures during long background sessions.
This means:
- You won't get disconnected due to expired tokens
- The refresh happens silently in the background
- Even during all-day shoots, your connection stays authenticated
Tips for Best Background Performance
- Enable battery optimization exemption (Android) — This is the most important step
- Keep the app connected — Don't manually disconnect unless you're done for the day
- Monitor the notification (Android) — If it disappears, you've been disconnected
- Return to the app periodically (iOS) — Ensures the connection is maintained
- Use a power source — For long shoots, keep your device plugged in
- Close unused apps — Reduce memory pressure that could cause the OS to kill CrewTalk
