Microphone, camera, and notification permissions for Alaznah Calling.
Permissions
Two layers:
- Native config —
Info.plist/AndroidManifest.xml(required before the OS will prompt) - Runtime —
requestCallPermissionsbefore the first call
Rebuild the native app after changing plist or manifest.
Which permissions do you need?
| App offers | Native mic | Native camera | Runtime call |
|---|---|---|---|
| Voice only | Yes | No | requestCallPermissions('audio') |
| Video only | Yes | Yes | requestCallPermissions('video') |
| Voice and video | Yes | Yes | 'audio' or 'video' for the upcoming call (or 'video' at startup for mic + camera) |
Runtime (JavaScript)
import { requestCallPermissions } from '@alaznah/calling';
// for audio call
const audio = await requestCallPermissions('audio');
if (!audio.microphone) {
// show UI — mic denied
}
// for video call (mic + camera)
const video = await requestCallPermissions('video');
if (!video.microphone || !video.camera) {
// show UI — denied
}'audio' | 'video'. Returns { microphone, camera, bluetooth }.
On iOS, system prompts often appear on first getUserMedia; plist strings must still be present or the app can crash.
iOS — Info.plist
Add usage descriptions (edit ios/<AppName>/Info.plist or Xcode → Info):
<key>NSMicrophoneUsageDescription</key>
<string>Microphone access is required for audio and video calls.</string>
<!-- Required if your app places or accepts video calls -->
<key>NSCameraUsageDescription</key>
<string>Camera access is required for video calls.</string>Background modes (calling)
Xcode → Signing & Capabilities → Background Modes, enable at least:
- Audio, AirPlay, and Picture in Picture (
audio) — keep call audio in background - Voice over IP (
voip) — VoIP / PushKit wake
Or in plist:
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>voip</string>
<string>remote-notification</string>
</array>Also enable Push Notifications capability. CallKit / PushKit setup: Push Notifications.
Voice-only vs video (iOS)
| Key / capability | Voice only | Video / both |
|---|---|---|
NSMicrophoneUsageDescription | Required | Required |
NSCameraUsageDescription | Optional | Required |
| Background Modes → Audio | Recommended | Recommended |
| Background Modes → VoIP | For kill/background ring | For kill/background ring |
Android — AndroidManifest.xml
In android/app/src/main/AndroidManifest.xml, inside <manifest> (before <application>):
Minimum (voice)
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />Add for video (or voice + video app)
<uses-permission android:name="android.permission.CAMERA" />Recommended for notifications, Bluetooth, incoming UI
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />@alaznah/calling already declares several of these in its library manifest; merging usually picks them up. If a permission is missing after install, add it explicitly in the app manifest as above.
Voice-only vs video (Android)
| Permission | Voice only | Video / both |
|---|---|---|
INTERNET | Required | Required |
RECORD_AUDIO | Required | Required |
CAMERA | — | Required |
MODIFY_AUDIO_SETTINGS | Recommended | Recommended |
POST_NOTIFICATIONS | API 33+ notify | API 33+ notify |
BLUETOOTH_CONNECT | Headsets | Headsets |
| Full-screen / FGS phone call | Native incoming | Native incoming |
Expo
Expo Go is not supported. Use a development build with the @alaznah/calling config plugin — Installation. Still verify the generated plist / manifest after prebuild.
Checklist
- Add Info.plist / AndroidManifest entries for the features you ship
- Rebuild the native app (Metro reload is not enough)
- Call
requestCallPermissions('audio')orrequestCallPermissions('video')before the first call - Re-check after the user revokes permission in system Settings