시작하기
설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함한 설정 프롬프트를 복사하세요.
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.
설치
설치 제목Capgo 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 -
로컬 프로젝트 동기화
터미널 창 bunx cap sync -
벨 소스 선택 SDK에서 ring 이벤트를 받는 방법은 backend, Twilio 또는 Stream과 같은 SDK, 또는 FCM 또는 PushKit과 같은 네이티브 푸시 경로 중 하나입니다.
통합 패턴
통합 패턴이 플러그인은 네이티브 incoming-call 표시만 관리합니다. 앱은 여전히 전송, 인증, 그리고 실제 미디어 세션을 관리합니다.
생산 환경에서 일반적인 패턴은 다음과 같습니다.
- backend 또는 SDK가 ring 이벤트를.emit합니다.
- 앱은
showIncomingCall(). - 이 플러그인은 네이티브 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: 리스너 페이로드에서 반사된 임의의 JSONandroid.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가 성공적으로 표시되었습니다callAccepted: 사용자가 native UI에서 수락했습니다.callDeclined: 사용자가 참여하기 전에 거절했습니다.callEnded: 앱 또는 플랫폼이 추적된 통화를 종료했습니다.callTimedOut: 통화가timeoutMs
: 사용자 이벤트의 각 이벤트는 정규화된 call : 사용자의 원본 extra : 플랫폼 정보
: ‘플랫폼 정보’라는 제목의 섹션
:- : : iOS 가이드 : PushKit 또는 APNs 흐름에 CallKit을 연결하기 전에 iOS 가이드
- Capgo UI를 읽어보세요. 안드로이드 가이드 안드로이드 14 이상에서 전체 화면 인텐트에 의존하기 전에 읽어보세요.
- 웹은 지원되지 않습니다.
Getting Started에서 계속 진행하세요.
Getting Started에서 계속 진행하세요.Capgo를 사용하여 대시보드와 __CAPGO_KEEP_0__ 연산을 계획하고 있다면 __CAPGO_KEEP_0__을 Capgo를 사용하여 @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-incoming-call-kit Capgo를 사용하여 @API/__CAPGO_KEEP_1__-incoming-call-kit Using @capgo/capacitor-incoming-call-kit for the native capability in Using @capgo/capacitor-incoming-call-kit, API Overview implementation 세부 정보를 위한 API 개요 소개 implementation 세부 정보를 위한 소개 API 키 implementation 세부 정보를 위한 API 키 및 기기 implementation 세부 정보를 위한 기기