Getting Started
이 플러그인의 설치 단계와 전체 마크다운 가이드를 포함한 설정 지시를 복사하세요.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-incoming-call-kit`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/incoming-call-kit/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
-
Install the package
Terminal window bun add @capgo/capacitor-incoming-call-kit -
Sync native projects
Terminal window bunx cap sync -
Choose your ring source Decide whether the incoming-call event comes from your backend, an SDK such as Twilio or Stream, or a native push path such as FCM or PushKit.
How the integration fits together
Section titled “How the integration fits together”This plugin only owns native incoming-call presentation. Your app still owns transport, authentication, and the actual media session.
The common production pattern is:
- SDK의 ring 이벤트를 발생시킨 백엔드 또는 SDK가 호출됩니다.
- __CAPGO_KEEP_0__이 호출합니다.
showIncomingCall(). - native incoming-call UI를 제공하는 플러그인이 있습니다.
callAccepted실제 회의나 VoIP 세션에 __CAPGO_KEEP_0__을 참여시킵니다.callDeclined,callEnded또는callTimedOut__CAPGO_KEEP_0__을 사용하여远程 상태를 정리합니다.
최소한의 통합
최소한의 통합import { IncomingCallKit } from '@capgo/capacitor-incoming-call-kit';
await IncomingCallKit.requestPermissions();await IncomingCallKit.requestFullScreenIntentPermission();
await IncomingCallKit.addListener('callAccepted', async ({ call }) => { console.log('Accepted', call.callId, call.extra); // Start or join your real call session here.});
await IncomingCallKit.addListener('callDeclined', ({ call }) => { console.log('Declined', call.callId); // Tell your backend or SDK that the user declined.});
await IncomingCallKit.addListener('callTimedOut', ({ call }) => { console.log('Timed out', call.callId); // Clear ringing state in your backend or SDK.});
await IncomingCallKit.showIncomingCall({ callId: 'call-42', callerName: 'Ada Lovelace', handle: '+39 555 010 020', appName: 'Capgo Phone', hasVideo: true, timeoutMs: 45_000, extra: { roomId: 'room-42', callerUserId: 'user_ada', }, android: { channelId: 'calls', channelName: 'Incoming Calls', showFullScreen: true, }, ios: { handleType: 'phoneNumber', },});중요한 옵션
중요한 옵션callId: __CAPGO_KEEP_0__endCall()timeoutMs최선을 다하는 답변이 없는 타임아웃extra리스너 페이로드에 임의의 JSON이 반영됩니다.android.channelId그리고android.channelNameAndroid 알림 채널 조정android.showFullScreenAndroid incoming-call 활동을 요청합니다.ios.handleType선택하세요.generic,phoneNumber, 또는emailAddressCallKit
전화 관리
전화 관리const { calls } = await IncomingCallKit.getActiveCalls();
await IncomingCallKit.endCall({ callId: 'call-42', reason: 'remote-ended',});
await IncomingCallKit.endAllCalls({ reason: 'session-reset',});이벤트 모델
이벤트 모델incomingCallDisplayed: 네이티브 UI가 성공적으로 표시되었습니다callAccepted: 사용자가 네이티브 UI에서 승인했습니다callDeclined: 사용자가 참여하기 전에 거절했습니다callEnded: 앱 또는 플랫폼이 추적된 전화 통화를 종료했습니다callTimedOut: 전화가 답변되지 않고 남아있었습니다timeoutMs
각 이벤트는 정규화된 call 파이로드와 원본 extra 객체를 포함합니다.
플랫폼 노트
플랫폼 노트- 읽기 iOS 가이드 iOS 플랫폼에 CallKit을 PushKit 또는 APNs 흐름에 통합하기 전에.
- Read the Android 가이드 Android 14 이상에서 전체 화면 인텐트에 의존하기 전에.
- Web은 지원되지 않습니다.
Getting Started에서 계속하기
Getting Started에서 계속하기Getting Started를 사용하여 dashboard 및 __CAPGO_KEEP_0__ 작업을 계획하고 있습니다. __CAPGO_KEEP_0__를 __CAPGO_KEEP_1__-incoming-call-kit와 연결하세요. Using @API/__CAPGO_KEEP_1__-incoming-call-kit Using @capgo/capacitor-incoming-call-kit capgo의 원천 기능을 위한 @capacitor/capgo-incoming-call-kit을 사용하세요. API 개요 API의 구현 세부 정보를 위한 API 개요 소개 소개의 구현 세부 정보를 위한 __CAPGO_KEEP_0__ API 키 API 키의 구현 세부 정보를 위한 API 및 기기 기기의 구현 세부 정보를 위한 기기.