Repository navigation
Add background audio with foreground service and CallKit session - #2
Merged
Merged
Conversation
Keep microphone capture and playback running while the app is in the background, with an Android foreground service and an iOS CallKit session. Co-authored-by: Cursor <cursoragent@cursor.com>
graszka22
force-pushed
the
graszka22/background-audio
branch
from
October 22, 2026 16:08
a13c12e to
b3525c6
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved Android service crash and cancellation paths, plus CallKit lifecycle defects, can disrupt calls or leave resources running.
5 open issues
What changed in this PR
Adds opt-in background-call support to the Flutter SDK through an Android foreground service and an iOS CallKit session.
Changes:
- Exposes background-service configuration and typed CallKit actions through public Dart APIs.
- Implements native service, permission, and CallKit lifecycle handling.
- Adds channel-level tests, example integration, and platform setup documentation.
| File | Description |
|---|---|
test/background/foreground_service_test.dart |
Tests service configuration and platform no-ops. |
test/background/call_kit_test.dart |
Tests CallKit methods and typed events. |
SPEC.md |
Defines background-call behavior and setup requirements. |
README.md |
Documents API usage and native configuration. |
lib/src/background/foreground_service.dart |
Adds the Android service API and configuration. |
lib/src/background/call_kit.dart |
Adds the CallKit API and action types. |
lib/fishjam_client.dart |
Exports the new public APIs. |
ios/fishjam_client/Sources/fishjam_client/FishjamClientPlugin.swift |
Registers background method and event channels. |
ios/fishjam_client/Sources/fishjam_client/CallKitManager.swift |
Implements CallKit sessions and media-session integration. |
example/lib/room_screen.dart |
Integrates background support into room lifecycle handling. |
example/ios/Runner/Info.plist |
Enables audio and VoIP background modes. |
example/android/app/src/main/AndroidManifest.xml |
Declares foreground-service permissions and service. |
CHANGELOG.md |
Records background-call support. |
android/src/main/kotlin/io/fishjam/client/foregroundservice/NotificationPermission.kt |
Handles notification permission requests. |
android/src/main/kotlin/io/fishjam/client/foregroundservice/ForegroundServiceController.kt |
Manages service configuration and requested types. |
android/src/main/kotlin/io/fishjam/client/foregroundservice/FishjamForegroundService.kt |
Implements the foreground service and notification. |
android/src/main/kotlin/io/fishjam/client/FishjamClientPlugin.kt |
Connects service commands and activity permission callbacks. |
AGENTS.md |
Documents ownership of native-plugin Dart modules. |
Review effort: Balanced
Magmusacy
approved these changes
Oct 23, 2026
Magmusacy
left a comment
Contributor
There was a problem hiding this comment.
looks good, couldn't find any real issues that would prevent this from going to prod
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Keep microphone capture and playback running while the app is in the background, with an Android foreground service and an iOS CallKit session.