capacitor-call-keep v0.0.2
capacitor-call-keep
Capacitor Plugin for CallKit
Install
npm install capacitor-call-keep
npx cap syncAPI
echo(...)addListener('endCall', ...)addListener('answerCall', ...)addListener('toggleHold', ...)addListener('setMutedCall', ...)addListener('DTMFAction', ...)addListener('startCall', ...)addListener('activateAudioSession', ...)addListener('checkReachability', ...)addListener('showIncomingCallUi', ...)addListener('silenceIncomingCall', ...)addListener('registration', ...)setupAndroid(...)supportConnectionService()registerPhoneAccount()hasPhoneAccount()hasDefaultPhoneAccount()checkPhoneAccountEnabled()toggleAudioRouteSpeaker(...)setAvailable(...)registerAndroidEvents()isConnectionServiceAvailable()rejectCall(...)hasOutgoingCall()setForegroundServiceSettings(...)canMakeMultipleCalls(...)setCurrentCallActive(...)backToForeground()setupIOS(...)reportConnectedOutgoingCallWithUUID(...)reportConnectingOutgoingCallWithUUID(...)isCallActive(...)setMutedCall(...)getInitialEvents()getCalls()checkIfBusy()checkSpeaker()checkPermissions()requestPermissions()answerIncomingCall(...)displayIncomingCall(...)startCall(...)updateDisplay(...)reportEndCallWithUUID(...)endCall(...)endAllCalls()setReachable()getAudioRoutes()setAudioRoute(...)setOnHold(...)sendDTMF(...)- Interfaces
- Type Aliases
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>| Param | Type |
|---|---|
options | { value: string; } |
Returns: Promise<{ value: string; }>
addListener('endCall', ...)
addListener(type: 'endCall', l: L<UUID>) => PLH| Param | Type |
|---|---|
type | 'endCall' |
l | L<UUID> |
Returns: PLH
addListener('answerCall', ...)
addListener(type: 'answerCall', l: L<UUID>) => PLH| Param | Type |
|---|---|
type | 'answerCall' |
l | L<UUID> |
Returns: PLH
addListener('toggleHold', ...)
addListener(type: 'toggleHold', l: L<UUID & { hold: boolean; }>) => PLH| Param | Type |
|---|---|
type | 'toggleHold' |
l | L<UUID & { hold: boolean; }> |
Returns: PLH
addListener('setMutedCall', ...)
addListener(type: 'setMutedCall', l: L<UUID & { muted: boolean; }>) => PLH| Param | Type |
|---|---|
type | 'setMutedCall' |
l | L<UUID & { muted: boolean; }> |
Returns: PLH
addListener('DTMFAction', ...)
addListener(type: 'DTMFAction', l: L<UUID & { digits: string; }>) => PLH| Param | Type |
|---|---|
type | 'DTMFAction' |
l | L<UUID & { digits: string; }> |
Returns: PLH
addListener('startCall', ...)
addListener(type: 'startCall', l: L<CallInfo>) => PLH| Param | Type |
|---|---|
type | 'startCall' |
l | L<CallInfo> |
Returns: PLH
addListener('activateAudioSession', ...)
addListener(type: 'activateAudioSession', l: L<void>) => PLH| Param | Type |
|---|---|
type | 'activateAudioSession' |
l | L<void> |
Returns: PLH
addListener('checkReachability', ...)
addListener(type: 'checkReachability', l: L<void>) => PLH| Param | Type |
|---|---|
type | 'checkReachability' |
l | L<void> |
Returns: PLH
addListener('showIncomingCallUi', ...)
addListener(type: 'showIncomingCallUi', l: L<CallInfo>) => PLHNOTE: Only triggered if self managed
| Param | Type |
|---|---|
type | 'showIncomingCallUi' |
l | L<CallInfo> |
Returns: PLH
addListener('silenceIncomingCall', ...)
addListener(type: 'silenceIncomingCall', l: L<CallInfo>) => PLH| Param | Type |
|---|---|
type | 'silenceIncomingCall' |
l | L<CallInfo> |
Returns: PLH
addListener('registration', ...)
addListener(type: 'registration', l: L<{ token: string; }>) => PLHiOS only
| Param | Type |
|---|---|
type | 'registration' |
l | L<{ token: string; }> |
Returns: PLH
setupAndroid(...)
setupAndroid(options: AndroidOptions) => PV| Param | Type |
|---|---|
options | AndroidOptions |
Returns: PV
supportConnectionService()
supportConnectionService() => PBReturns: PB
registerPhoneAccount()
registerPhoneAccount() => PVReturns: PV
hasPhoneAccount()
hasPhoneAccount() => PBReturns: PB
hasDefaultPhoneAccount()
hasDefaultPhoneAccount() => PBReturns: PB
checkPhoneAccountEnabled()
checkPhoneAccountEnabled() => PBReturns: PB
toggleAudioRouteSpeaker(...)
toggleAudioRouteSpeaker(o: { uuid: string; routeSpeaker: boolean; }) => PV| Param | Type |
|---|---|
o | { uuid: string; routeSpeaker: boolean; } |
Returns: PV
setAvailable(...)
setAvailable(o: { active: boolean; }) => PV| Param | Type |
|---|---|
o | { active: boolean; } |
Returns: PV
registerAndroidEvents()
registerAndroidEvents() => PVReturns: PV
isConnectionServiceAvailable()
isConnectionServiceAvailable() => PBReturns: PB
rejectCall(...)
rejectCall(o: { uuid: string; }) => PV| Param | Type |
|---|---|
o | { uuid: string; } |
Returns: PV
hasOutgoingCall()
hasOutgoingCall() => PBReturns: PB
setForegroundServiceSettings(...)
setForegroundServiceSettings(o: { settings: Obj; }) => PV| Param | Type |
|---|---|
o | { settings: Obj; } |
Returns: PV
canMakeMultipleCalls(...)
canMakeMultipleCalls(o: { allow: boolean; }) => PV| Param | Type |
|---|---|
o | { allow: boolean; } |
Returns: PV
setCurrentCallActive(...)
setCurrentCallActive(o: { callUUID: string; }) => PV| Param | Type |
|---|---|
o | { callUUID: string; } |
Returns: PV
backToForeground()
backToForeground() => PVReturns: PV
setupIOS(...)
setupIOS(options: IOSOptions) => PV| Param | Type |
|---|---|
options | IOSOptions |
Returns: PV
reportConnectedOutgoingCallWithUUID(...)
reportConnectedOutgoingCallWithUUID(args: { uuid: string; }) => PV| Param | Type |
|---|---|
args | { uuid: string; } |
Returns: PV
reportConnectingOutgoingCallWithUUID(...)
reportConnectingOutgoingCallWithUUID(o: { uuid: string; }) => PV| Param | Type |
|---|---|
o | { uuid: string; } |
Returns: PV
isCallActive(...)
isCallActive(o: { uuid: string; }) => PB| Param | Type |
|---|---|
o | { uuid: string; } |
Returns: PB
setMutedCall(...)
setMutedCall(o: { uuid: string; muted: boolean; }) => PV| Param | Type |
|---|---|
o | { uuid: string; muted: boolean; } |
Returns: PV
getInitialEvents()
getInitialEvents() => Promise<{ name: string; body: string; }[]>Returns: Promise<{ name: string; body: string; }[]>
getCalls()
getCalls() => Promise<Call[]>Returns: Promise<Call[]>
checkIfBusy()
checkIfBusy() => PBReturns: PB
checkSpeaker()
checkSpeaker() => PBReturns: PB
checkPermissions()
checkPermissions() => Promise<PermissionStatus>Returns: Promise<PermissionStatus>
requestPermissions()
requestPermissions() => Promise<PermissionStatus>Returns: Promise<PermissionStatus>
answerIncomingCall(...)
answerIncomingCall(o: { uuid: string; }) => PV| Param | Type |
|---|---|
o | { uuid: string; } |
Returns: PV
displayIncomingCall(...)
displayIncomingCall(o: { uuid: string; number: string; callerName: string; handleType?: HandleType; hasVideo?: boolean; options?: IncomingCallOptions; }) => PV| Param | Type |
|---|---|
o | { uuid: string; number: string; callerName: string; handleType?: HandleType; hasVideo?: boolean; options?: IncomingCallOptions; } |
Returns: PV
startCall(...)
startCall(o: { uuid: string; handle: string; contactIdentifier?: string; handleType?: HandleType; hasVideo?: boolean; }) => PV| Param | Type |
|---|---|
o | { uuid: string; handle: string; contactIdentifier?: string; handleType?: HandleType; hasVideo?: boolean; } |
Returns: PV
updateDisplay(...)
updateDisplay(o: { uuid: string; displayName: string; handle: string; options?: IncomingCallOptions; }) => PV| Param | Type |
|---|---|
o | { uuid: string; displayName: string; handle: string; options?: IncomingCallOptions; } |
Returns: PV
reportEndCallWithUUID(...)
reportEndCallWithUUID(o: { uuid: string; reason: number; }) => PV| Param | Type |
|---|---|
o | { uuid: string; reason: number; } |
Returns: PV
endCall(...)
endCall(o: { uuid: string; }) => PV| Param | Type |
|---|---|
o | { uuid: string; } |
Returns: PV
endAllCalls()
endAllCalls() => PVReturns: PV
setReachable()
setReachable() => PVReturns: PV
getAudioRoutes()
getAudioRoutes() => PVReturns: PV
setAudioRoute(...)
setAudioRoute(o: { uuid: string; inputName: string; }) => PV| Param | Type |
|---|---|
o | { uuid: string; inputName: string; } |
Returns: PV
setOnHold(...)
setOnHold(o: { uuid: string; held: boolean; }) => PV| Param | Type |
|---|---|
o | { uuid: string; held: boolean; } |
Returns: PV
sendDTMF(...)
sendDTMF(o: { uuid: string; key: string; }) => PVsendDTMF is used to send DTMF tones to the PBX.
| Param | Type |
|---|---|
o | { uuid: string; key: string; } |
Returns: PV
Interfaces
PluginListenerHandle
| Prop | Type |
|---|---|
remove | () => Promise<void> |
AndroidOptions
| Prop | Type |
|---|---|
selfManaged | boolean |
imageName | string |
foregroundService | { channelId: string; channelName: string; notificationTitle: string; notificationIcon: string; } |
IOSOptions
| Prop | Type |
|---|---|
appName | string |
imageName | string |
supportsVideo | boolean |
maximumCallGroups | string |
maximumCallsPerCallGroup | string |
ringtoneSound | string |
includesCallsInRecents | boolean |
Call
| Prop | Type |
|---|---|
callUUID | string |
outgoing | boolean |
onHold | boolean |
hasConnected | boolean |
hasEnded | boolean |
PermissionStatus
| Prop | Type |
|---|---|
readPhoneNumbers | PermissionState |
readPhoneState | PermissionState |
manageOwnCalls | PermissionState |
callPhone | PermissionState |
recordAudio | PermissionState |
IncomingCallOptions
| Prop | Type |
|---|---|
ios | { supportsHolding?: boolean; supportsDTMF?: boolean; supportsGrouping?: boolean; supportsUngrouping?: boolean; } |
Type Aliases
PLH
Promise<PluginListenerHandle> & PluginListenerHandle
L
(t: T): void
UUID
{ callUUID: string }
CallInfo
{ callUUID: string; handle: string; name: string }
PV
Promise<void>
PB
Promise<{ value: boolean }>
Obj
Record<string, string>
Record
Construct a type with a set of properties K of type T
{
}
PermissionState
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'
HandleType
'generic' | 'number' | 'email'