react-native-webrtc/react-native-callkeep
소개
React Native용 iOS CallKit 프레임워크 및 Android ConnectionService
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +1
- in 1 month
- +1
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalReact Native CallKeep
React Native CallKeep shows your app's VoIP calls in the phone's own call UI: CallKit on iOS and ConnectionService (Telecom) on Android. Incoming calls ring on the lock screen, calls appear in the system's recents, and the user answers, holds, mutes or hangs up from the system UI.
CallKeep handles the call UI and the system integration. The audio and the signaling come from your VoIP stack, for example react-native-webrtc or a SIP library.
Compatibility
| React Native | Tested with 0.87, New Architecture enabled |
| iOS | React Native's minimum (15.1 with 0.87). Calls need a device: the Simulator has no CallKit service. Tested on iOS 26 and 27 |
| Android | Android 6 (API 23) and later; self-managed mode needs Android 8 (API 26). Calls work on emulators. Tested on Android 10 and 16 |
| Expo | With a development build, not Expo Go: see the Expo guide |
Installation
npm install react-native-callkeep
cd ios && pod install
An app that builds its iOS libraries with Swift Package Manager runs npx react-native spm instead of pod install: see Swift Package Manager.
Then follow the platform setup: iOS and Android.
Quick start
import RNCallKeep from 'react-native-callkeep';
await RNCallKeep.setup({
ios: { appName: 'My App' },
android: {
// Shown when the user has to enable the app's phone account.
alertTitle: 'Permissions required',
alertDescription: 'This application needs to access your phone accounts',
cancelButton: 'Cancel',
okButton: 'OK',
additionalPermissions: [],
},
});
// The user answered, from the system call UI or your app.
RNCallKeep.addEventListener('answerCall', ({ callUUID }) => {
// Connect the call's media, then tell Android the call is active.
RNCallKeep.setCurrentCallActive(callUUID);
});
// The call ended, from the system call UI or your app.
RNCallKeep.addEventListener('endCall', ({ callUUID }) => {
// Hang up the call's media.
});
// An incoming call, typically when your server tells the app about one.
// callUUID is a UUID v4 that identifies the call, for example from the `uuid` package.
RNCallKeep.displayIncomingCall(callUUID, '5551234', 'Alice');
The example app shows every part of the library with simulated calls, on iOS and Android, and explains which file to look at for each part.
Documentation
- Setup and options
- API reference and events
- Guides: incoming calls when the app isn't running (VoIP push), Android self-managed mode, iOS 27 scene life cycle, Expo
- Troubleshooting
- Migrating from an older major version: v2 to v3, v3 to v4
- Changelog
Contributing
Pull requests, issue reports and suggestions are welcome. See CONTRIBUTING.md for how to try a change in an app and what a pull request needs, SECURITY.md to report a vulnerability privately, and the Code of Conduct that applies to everyone taking part.
License
This work is dual-licensed under ISC and MIT. Previous work done by @ianlin on iOS is under the ISC license; the rest of the project is under MIT.
SPDX-License-Identifier: ISC OR MIT
관련 프로젝트 살펴보기
불러오는 중…