시작하기
이 플러그인의 설치 단계와 전체 마크다운 가이드를 포함한 설정 프롬프트를 복사하십시오.
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 -
로컬 프로젝트 동기화
터미널 창 bunx cap sync -
벨 소스 선택 incoming-call 이벤트는 backend, SDK (예: Twilio, Stream) 또는 native push path (예: FCM, PushKit)에서 오는지 결정해야 합니다.
통합 방법
통합 방법이 플러그인은 native incoming-call 표시만 관리합니다. 앱은 여전히 전송, 인증, 실제 미디어 세션을 관리합니다.
통합 패턴은 다음과 같습니다.
- backend 또는 호출 SDK가 ring 이벤트를 방출합니다.
- 앱은
showIncomingCall(). - Plugin은 원시적인 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 객체를 포함합니다.
플랫폼 참고 사항
제목이 "플랫폼 참고 사항"인 섹션- Capgo UI에서 longer string의 부모 키 (`read_the_style_guide`)에서 HTML 텍스트 프래그먼트를 읽으십시오. iOS 가이드 PushKit 또는 APNs 흐름에 CallKit을 연결하기 전에
- Capgo를 읽어보세요 안드로이드 가이드 Android 14 이상에서 전체 화면 인텐트에 의존하기 전에 읽어보세요.
- 웹은 지원되지 않습니다.
Getting Started에서 계속하세요
Getting Started에서 계속하세요Capgo를 사용하여 Getting Started 계획 대시보드 및 API 작업을 계획하기 위해 Capgo를 사용하는 경우 API와 연결하세요. Capacitor를 사용하여 @capgo/capacitor-incoming-call-kit Capacitor를 사용하여 @capgo/capacitor-incoming-call-kit를 사용하여 Capgo의 native 기능을 사용하세요. API 개요 implementation 세부 정보를 위한 API 개요 소개 implementation 세부 정보를 위한 Introduction API 키 implementation 세부 정보를 위한 API 키 및 장치 implementation 세부 정보를 위한 장치