0.0.2 • Published 2 years ago

capacitor-call-keep v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

capacitor-call-keep

Capacitor Plugin for CallKit

Install

npm install capacitor-call-keep
npx cap sync

API

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>
ParamType
options{ value: string; }

Returns: Promise<{ value: string; }>


addListener('endCall', ...)

addListener(type: 'endCall', l: L<UUID>) => PLH
ParamType
type'endCall'
lL<UUID>

Returns: PLH


addListener('answerCall', ...)

addListener(type: 'answerCall', l: L<UUID>) => PLH
ParamType
type'answerCall'
lL<UUID>

Returns: PLH


addListener('toggleHold', ...)

addListener(type: 'toggleHold', l: L<UUID & { hold: boolean; }>) => PLH
ParamType
type'toggleHold'
lL<UUID & { hold: boolean; }>

Returns: PLH


addListener('setMutedCall', ...)

addListener(type: 'setMutedCall', l: L<UUID & { muted: boolean; }>) => PLH
ParamType
type'setMutedCall'
lL<UUID & { muted: boolean; }>

Returns: PLH


addListener('DTMFAction', ...)

addListener(type: 'DTMFAction', l: L<UUID & { digits: string; }>) => PLH
ParamType
type'DTMFAction'
lL<UUID & { digits: string; }>

Returns: PLH


addListener('startCall', ...)

addListener(type: 'startCall', l: L<CallInfo>) => PLH
ParamType
type'startCall'
lL<CallInfo>

Returns: PLH


addListener('activateAudioSession', ...)

addListener(type: 'activateAudioSession', l: L<void>) => PLH
ParamType
type'activateAudioSession'
lL<void>

Returns: PLH


addListener('checkReachability', ...)

addListener(type: 'checkReachability', l: L<void>) => PLH
ParamType
type'checkReachability'
lL<void>

Returns: PLH


addListener('showIncomingCallUi', ...)

addListener(type: 'showIncomingCallUi', l: L<CallInfo>) => PLH

NOTE: Only triggered if self managed

ParamType
type'showIncomingCallUi'
lL<CallInfo>

Returns: PLH


addListener('silenceIncomingCall', ...)

addListener(type: 'silenceIncomingCall', l: L<CallInfo>) => PLH
ParamType
type'silenceIncomingCall'
lL<CallInfo>

Returns: PLH


addListener('registration', ...)

addListener(type: 'registration', l: L<{ token: string; }>) => PLH

iOS only

ParamType
type'registration'
lL<{ token: string; }>

Returns: PLH


setupAndroid(...)

setupAndroid(options: AndroidOptions) => PV
ParamType
optionsAndroidOptions

Returns: PV


supportConnectionService()

supportConnectionService() => PB

Returns: PB


registerPhoneAccount()

registerPhoneAccount() => PV

Returns: PV


hasPhoneAccount()

hasPhoneAccount() => PB

Returns: PB


hasDefaultPhoneAccount()

hasDefaultPhoneAccount() => PB

Returns: PB


checkPhoneAccountEnabled()

checkPhoneAccountEnabled() => PB

Returns: PB


toggleAudioRouteSpeaker(...)

toggleAudioRouteSpeaker(o: { uuid: string; routeSpeaker: boolean; }) => PV
ParamType
o{ uuid: string; routeSpeaker: boolean; }

Returns: PV


setAvailable(...)

setAvailable(o: { active: boolean; }) => PV
ParamType
o{ active: boolean; }

Returns: PV


registerAndroidEvents()

registerAndroidEvents() => PV

Returns: PV


isConnectionServiceAvailable()

isConnectionServiceAvailable() => PB

Returns: PB


rejectCall(...)

rejectCall(o: { uuid: string; }) => PV
ParamType
o{ uuid: string; }

Returns: PV


hasOutgoingCall()

hasOutgoingCall() => PB

Returns: PB


setForegroundServiceSettings(...)

setForegroundServiceSettings(o: { settings: Obj; }) => PV
ParamType
o{ settings: Obj; }

Returns: PV


canMakeMultipleCalls(...)

canMakeMultipleCalls(o: { allow: boolean; }) => PV
ParamType
o{ allow: boolean; }

Returns: PV


setCurrentCallActive(...)

setCurrentCallActive(o: { callUUID: string; }) => PV
ParamType
o{ callUUID: string; }

Returns: PV


backToForeground()

backToForeground() => PV

Returns: PV


setupIOS(...)

setupIOS(options: IOSOptions) => PV
ParamType
optionsIOSOptions

Returns: PV


reportConnectedOutgoingCallWithUUID(...)

reportConnectedOutgoingCallWithUUID(args: { uuid: string; }) => PV
ParamType
args{ uuid: string; }

Returns: PV


reportConnectingOutgoingCallWithUUID(...)

reportConnectingOutgoingCallWithUUID(o: { uuid: string; }) => PV
ParamType
o{ uuid: string; }

Returns: PV


isCallActive(...)

isCallActive(o: { uuid: string; }) => PB
ParamType
o{ uuid: string; }

Returns: PB


setMutedCall(...)

setMutedCall(o: { uuid: string; muted: boolean; }) => PV
ParamType
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() => PB

Returns: PB


checkSpeaker()

checkSpeaker() => PB

Returns: PB


checkPermissions()

checkPermissions() => Promise<PermissionStatus>

Returns: Promise<PermissionStatus>


requestPermissions()

requestPermissions() => Promise<PermissionStatus>

Returns: Promise<PermissionStatus>


answerIncomingCall(...)

answerIncomingCall(o: { uuid: string; }) => PV
ParamType
o{ uuid: string; }

Returns: PV


displayIncomingCall(...)

displayIncomingCall(o: { uuid: string; number: string; callerName: string; handleType?: HandleType; hasVideo?: boolean; options?: IncomingCallOptions; }) => PV
ParamType
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
ParamType
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
ParamType
o{ uuid: string; displayName: string; handle: string; options?: IncomingCallOptions; }

Returns: PV


reportEndCallWithUUID(...)

reportEndCallWithUUID(o: { uuid: string; reason: number; }) => PV
ParamType
o{ uuid: string; reason: number; }

Returns: PV


endCall(...)

endCall(o: { uuid: string; }) => PV
ParamType
o{ uuid: string; }

Returns: PV


endAllCalls()

endAllCalls() => PV

Returns: PV


setReachable()

setReachable() => PV

Returns: PV


getAudioRoutes()

getAudioRoutes() => PV

Returns: PV


setAudioRoute(...)

setAudioRoute(o: { uuid: string; inputName: string; }) => PV
ParamType
o{ uuid: string; inputName: string; }

Returns: PV


setOnHold(...)

setOnHold(o: { uuid: string; held: boolean; }) => PV
ParamType
o{ uuid: string; held: boolean; }

Returns: PV


sendDTMF(...)

sendDTMF(o: { uuid: string; key: string; }) => PV

sendDTMF is used to send DTMF tones to the PBX.

ParamType
o{ uuid: string; key: string; }

Returns: PV


Interfaces

PluginListenerHandle

PropType
remove() => Promise<void>

AndroidOptions

PropType
selfManagedboolean
imageNamestring
foregroundService{ channelId: string; channelName: string; notificationTitle: string; notificationIcon: string; }

IOSOptions

PropType
appNamestring
imageNamestring
supportsVideoboolean
maximumCallGroupsstring
maximumCallsPerCallGroupstring
ringtoneSoundstring
includesCallsInRecentsboolean

Call

PropType
callUUIDstring
outgoingboolean
onHoldboolean
hasConnectedboolean
hasEndedboolean

PermissionStatus

PropType
readPhoneNumbersPermissionState
readPhoneStatePermissionState
manageOwnCallsPermissionState
callPhonePermissionState
recordAudioPermissionState

IncomingCallOptions

PropType
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'

0.0.2

2 years ago

0.0.1

2 years ago