Skip to content

docs: write the Expo guide - #903

Merged
sboily merged 1 commit into
masterfrom
docs/expo-guide
Oct 17, 2026
Merged

sboily merged 1 commit into
masterfrom
docs/expo-guide

Conversation

@sboily

@sboily sboily commented Oct 17, 2026

Copy link
Copy Markdown
Member

Closes #621. Takes over #849 by @sultanmyrza, which added Expo instructions to the README; the documentation has since moved to docs/, so they go to docs/guides/expo.md, which was one paragraph.

Checked against the config plugin

From the source of @config-plugins/react-native-callkeep 14.0.2 and npx expo prebuild on a new Expo SDK 58 app (React Native 0.88):

What the guide adds

  • iOS: the audio background mode and NSMicrophoneUsageDescription (the plugin only adds voip).
  • Android: FOREGROUND_SERVICE_PHONE_CALL, FOREGROUND_SERVICE_MICROPHONE, POST_NOTIFICATIONS, and a 25-line local config plugin that gives VoiceConnectionService the phoneCall|microphone types of the Android guide. The plugin doesn't change a service that is already declared, so the local plugin creates it or updates it: prebuild gives one service with phoneCall|microphone and its intent filter with the two plugins in either order. The guide's exact app.json keys and plugin code were run through prebuild.

Why the permission matters: CallKeep starts its foreground service with the types declared on the service. I built the example app with the manifest the plugin generates (phoneCall, no FOREGROUND_SERVICE_PHONE_CALL) and answered a call on a Galaxy S24 with Android 16: the call works, but no foreground service runs, and the log shows

W/RNCallKeep: [VoiceConnectionService] Can't start foreground service : java.lang.SecurityException: Starting FGS with type phoneCall callerApp=... targetSDK=36 requires permissions: all of the permissions allOf=true [android.permission...

With the permission the same build runs the foreground service (isForeground=true).

The Expo guide was one paragraph about development builds. It now covers
@config-plugins/react-native-callkeep, from its source (14.0.2) and from
npx expo prebuild on a new Expo SDK 58 app:

- what the plugin adds (voip background mode, CallKit; Android permissions,
  VoiceConnectionService with the phoneCall type, the headless service);
- what to add in app.json: the audio background mode and microphone text
  on iOS, the foreground service permissions and POST_NOTIFICATIONS on
  Android, and a small local plugin for the phoneCall|microphone service
  types of the Android guide. Prebuild gives the same manifest with the
  plugins in either order.

Without FOREGROUND_SERVICE_PHONE_CALL, the plugin's setup loses the
foreground service on Android 14+: the example app built with the plugin's
manifest logs "Can't start foreground service: SecurityException: Starting
FGS with type phoneCall ... requires permissions" on a Galaxy S24 with
Android 16.

Plugins before 13.0.0 (Expo SDK 54 and earlier) don't add RECORD_AUDIO,
which CallKeep's managed mode checks: the cause of #621.

Based on #849 by sultanmyrza.

Co-authored-by: sultanmyrza <sultanmyrza@gmail.com>
@sboily
sboily merged commit ac9c4b0 into master Oct 17, 2026
4 checks passed
@sboily
sboily deleted the docs/expo-guide branch October 17, 2026 20:39
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.

displayIncomingCall ignored due to no ConnectionService or no phone account

1 participant