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.
설치
설치 제목AI-Assisted Setup을 사용하여 플러그인을 설치할 수 있습니다. AI 도구에 Capgo 기능을 추가하려면 다음 명령어를 사용하세요:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins그다음에 다음 프롬프트를 사용하세요:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-incoming-call-kit` plugin in my project.만약 Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:
-
패키지 설치
터미널 창 bun add @capgo/capacitor-incoming-call-kit -
Sync native projects
Terminal window bunx cap sync -
Ring source를 선택하세요 incoming-call 이벤트가 backend, Twilio 또는 Stream과 같은 SDK 또는 native push path인 FCM 또는 PushKit에서 오는지 결정하세요
Integration이 어떻게 맞물리는지
Integration이 어떻게 맞물리는지이 플러그인은 native incoming-call 표시만 관리합니다. 앱은 여전히 transport, 인증, 그리고 실제 미디어 세션을 관리합니다.
생산 환경에서 일반적인 패턴은 다음과 같습니다:
- backend 또는 호출 SDK가 ring 이벤트를 방출합니다.
- 앱이
showIncomingCall(). - 플러그인이 native incoming-call UI를 표시합니다.
callAccepted앱이 실제 회의나 VoIP 세션에 참여하도록 지시합니다.callDeclined,callEnded, 또는callTimedOut앱이 원격 상태를 정리하도록 지시합니다.
최소한의 통합
최소한의 통합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: 나중에 재사용할 수 있는 안정적인 식별자endCall()timeoutMs: 최선을 다하는 답변이 없는 타임아웃extra그리고android.channelId그리고android.channelName: 안드로이드 알림 채널 조정android.showFullScreen: 안드로이드 전면 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에서 수락했습니다.callAcceptedprotectedTokenscallDeclined: 사용자가 참여하기 전에 거절했습니다.callEnded: 앱 또는 플랫폼이 추적된 통화를 종료했습니다.callTimedOut: 통화는timeoutMs
: 이벤트는 정규화된 call : 원본 extra : 플랫폼 정보
: ‘플랫폼 정보’라는 제목의 섹션
:- context HTML text fragment from a longer Capgo UI string (parent key `read_the_style_guide`). Page/area: Capgo marketing website. Role: Website copy sentence. Seen in: page contributing.astro. Message key `read_the_style_guide` (Read The Style Guide). : iOS 가이드
- : PushKit 또는 APNs 흐름에 CallKit을 연결하기 전에 읽어보세요. 안드로이드 가이드 Android 14 이상에서 전체 화면 인텐트에 의존하기 전에 먼저 알아야 할 사항입니다.
- 웹 지원이 없습니다.
Getting Started에서 계속하기
Getting Started에서 계속하기이 기능을 사용하는 경우 Getting Started API를 사용하여 대시보드와 API 연산을 계획하고 싶다면 API와 연결하세요. @capgo/capacitor-incoming-call-kit을 사용하여 @capgo/capacitor-incoming-call-kit을 사용하여 API 개요 API 개요 소개 소개에 대한 구현 세부 정보를 위해 API 키 API 키에 대한 구현 세부 정보를 위해, 및 장치 소개에 대한 구현 세부 정보를 위해