npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

capacitor-incoming-call-kit

v0.1.2

Published

A Capacitor plugin to show incoming call in your Capacitor app(Custom for Android/Callkit for iOS)

Downloads

765

Readme

capacitor-incoming-call-kit

A Capacitor plugin to show incoming call in your Capacitor app(Custom for Android/Callkit for iOS)

This plugin is a modification of the Flutter plugin: flutter_callkit_incoming to suite a capacitor app so all credits goes to hiennguyen92

The plugin is has @capacitor/push-notifications version 6.0.2 integrated

Install

npm install capacitor-incoming-call-kit
npx cap sync

API

getInitialEvents()

getInitialEvents() => Promise<InitialEvents>

Returns: Promise<InitialEvents>


clearInitialEvents()

clearInitialEvents() => void

addEventListener(...)

addEventListener<Event extends keyof NativeEvents>(type: Event, handler: (args: EventsPayload[Event]) => void) => EventListener

| Param | Type | | ------------- | ---------------------------------------------------- | | type | Event | | handler | (args: EventsPayload[Event]) => void |

Returns: EventListener


removeEventListener(...)

removeEventListener(type: Events) => void

| Param | Type | | ---------- | ----------------------------------------------------------- | | type | keyof NativeEvents |


setup(...)

setup(options: IOptions) => Promise<boolean>

| Param | Type | | ------------- | --------------------------------------------- | | options | IOptions |

Returns: Promise<boolean>


hasDefaultPhoneAccount()

hasDefaultPhoneAccount() => boolean

Returns: boolean


answerIncomingCall(...)

answerIncomingCall(uuid: string) => void

| Param | Type | | ---------- | ------------------- | | uuid | string |


registerPhoneAccount(...)

registerPhoneAccount(options: IOptions) => void

| Param | Type | | ------------- | --------------------------------------------- | | options | IOptions |


registerAndroidEvents()

registerAndroidEvents() => void

unregisterAndroidEvents()

unregisterAndroidEvents() => void

displayIncomingCall(...)

displayIncomingCall(uuid: string, handle: string, localizedCallerName?: string | undefined, handleType?: HandleType | undefined, hasVideo?: boolean | undefined, options?: object | undefined) => void

| Param | Type | | ------------------------- | ------------------------------------------------- | | uuid | string | | handle | string | | localizedCallerName | string | | handleType | HandleType | | hasVideo | boolean | | options | object |


startCall(...)

startCall(uuid: string, handle: string, contactIdentifier?: string | undefined, handleType?: HandleType | undefined, hasVideo?: boolean | undefined) => void

| Param | Type | | ----------------------- | ------------------------------------------------- | | uuid | string | | handle | string | | contactIdentifier | string | | handleType | HandleType | | hasVideo | boolean |


updateDisplay(...)

updateDisplay(uuid: string, displayName: string, handle: string, options?: object | undefined) => void

| Param | Type | | ----------------- | ------------------- | | uuid | string | | displayName | string | | handle | string | | options | object |


checkPhoneAccountEnabled()

checkPhoneAccountEnabled() => Promise<boolean>

Returns: Promise<boolean>


isConnectionServiceAvailable()

isConnectionServiceAvailable() => Promise<boolean>

Returns: Promise<boolean>


reportConnectedOutgoingCallWithUUID(...)

reportConnectedOutgoingCallWithUUID(uuid: string) => void

| Param | Type | | ---------- | ------------------- | | uuid | string |


reportConnectingOutgoingCallWithUUID(...)

reportConnectingOutgoingCallWithUUID(uuid: string) => void

| Param | Type | | ---------- | ------------------- | | uuid | string |


reportEndCallWithUUID(...)

reportEndCallWithUUID(uuid: string, reason: number) => void

| Param | Type | | ------------ | ------------------- | | uuid | string | | reason | number |


rejectCall(...)

rejectCall(uuid: string) => void

| Param | Type | | ---------- | ------------------- | | uuid | string |


endCall(...)

endCall(uuid: string) => void

| Param | Type | | ---------- | ------------------- | | uuid | string |


endAllCalls()

endAllCalls() => void

setReachable()

setReachable() => void

setSettings(...)

setSettings(settings: IOptions) => void

| Param | Type | | -------------- | --------------------------------------------- | | settings | IOptions |


isCallActive(...)

isCallActive(uuid: string) => Promise<boolean>

| Param | Type | | ---------- | ------------------- | | uuid | string |

Returns: Promise<boolean>


getCalls()

getCalls() => Promise<{ callUUID: string; hasConnected: boolean; hasEnded: boolean; onHold: boolean; outgoing: boolean; }[] | void>

Returns: Promise<void | { callUUID: string; hasConnected: boolean; hasEnded: boolean; onHold: boolean; outgoing: boolean; }[]>


getAudioRoutes()

getAudioRoutes() => Promise<void>

supportConnectionService()

supportConnectionService() => boolean

Returns: boolean


hasPhoneAccount()

hasPhoneAccount() => Promise<boolean>

Returns: Promise<boolean>


hasOutgoingCall()

hasOutgoingCall() => Promise<boolean>

Returns: Promise<boolean>


setMutedCall(...)

setMutedCall(uuid: string, muted: boolean) => void

| Param | Type | | ----------- | -------------------- | | uuid | string | | muted | boolean |


toggleAudioRouteSpeaker(...)

toggleAudioRouteSpeaker(uuid: string, routeSpeaker: boolean) => void

| Param | Type | | ------------------ | -------------------- | | uuid | string | | routeSpeaker | boolean |


setOnHold(...)

setOnHold(uuid: string, held: boolean) => void

| Param | Type | | ---------- | -------------------- | | uuid | string | | held | boolean |


setConnectionState(...)

setConnectionState(uuid: string, state: number) => void

| Param | Type | | ----------- | ------------------- | | uuid | string | | state | number |


sendDTMF(...)

sendDTMF(uuid: string, key: string) => void

| Param | Type | | ---------- | ------------------- | | uuid | string | | key | string |


checkIfBusy()

checkIfBusy() => Promise<boolean>

Returns: Promise<boolean>


checkSpeaker()

checkSpeaker() => Promise<boolean>

Returns: Promise<boolean>


setAvailable(...)

setAvailable(active: boolean) => void

| Param | Type | | ------------ | -------------------- | | active | boolean |


setForegroundServiceSettings(...)

setForegroundServiceSettings(settings: NonNullable<IOptions['android']['foregroundService']>) => void

| Param | Type | | -------------- | -------------------------------------------------------------------------------------------------------------- | | settings | { channelId: string; channelName: string; notificationTitle: string; notificationIcon?: string; } |


canMakeMultipleCalls(...)

canMakeMultipleCalls(allow: boolean) => void

| Param | Type | | ----------- | -------------------- | | allow | boolean |


setCurrentCallActive(...)

setCurrentCallActive(callUUID: string) => void

| Param | Type | | -------------- | ------------------- | | callUUID | string |


backToForeground()

backToForeground() => void

checkIsInManagedCall()

checkIsInManagedCall() => Promise<boolean>

Returns: Promise<boolean>


Interfaces

EventListener

| Method | Signature | | ---------- | ------------- | | remove | () => void |

IOptions

| Prop | Type | | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ios | { appName: string; imageName?: string; supportsVideo?: boolean; maximumCallGroups?: string; maximumCallsPerCallGroup?: string; ringtoneSound?: string; includesCallsInRecents?: boolean; audioSession?: { categoryOptions?: number; mode?: string; }; } | | android | { alertTitle: string; alertDescription: string; cancelButton: string; okButton: string; imageName?: string; additionalPermissions: string[]; selfManaged?: boolean; foregroundService?: { channelId: string; channelName: string; notificationTitle: string; notificationIcon?: string; }; } |

Type Aliases

InitialEvents

{ [Event in Events]: { name: NativeEvents[Event], data: EventsPayload[Event] } }[Events][]

Events

keyof NativeEvents

NativeEvents

{ didReceiveStartCallAction: 'RNCallKeepDidReceiveStartCallAction'; answerCall: 'RNCallKeepPerformAnswerCallAction'; endCall: 'RNCallKeepPerformEndCallAction'; didActivateAudioSession: 'RNCallKeepDidActivateAudioSession'; didDeactivateAudioSession: 'RNCallKeepDidDeactivateAudioSession'; didDisplayIncomingCall: 'RNCallKeepDidDisplayIncomingCall'; didPerformSetMutedCallAction: 'RNCallKeepDidPerformSetMutedCallAction'; didToggleHoldCallAction: 'RNCallKeepDidToggleHoldAction'; didChangeAudioRoute: 'RNCallKeepDidChangeAudioRoute'; didPerformDTMFAction: 'RNCallKeepDidPerformDTMFAction'; showIncomingCallUi: 'RNCallKeepShowIncomingCallUi'; silenceIncomingCall: 'RNCallKeepOnSilenceIncomingCall'; createIncomingConnectionFailed: 'RNCallKeepOnIncomingConnectionFailed'; checkReachability: 'RNCallKeepCheckReachability'; didResetProvider: 'RNCallKeepProviderReset'; didLoadWithEvents: 'RNCallKeepDidLoadWithEvents'; onHasActiveCall : 'onHasActiveCall'; }

EventsPayload

{ didReceiveStartCallAction: { handle: string, callUUID?: string, name?: string }; answerCall: { callUUID: string }; endCall: { callUUID: string }; didActivateAudioSession: undefined; didDeactivateAudioSession: undefined; didDisplayIncomingCall: { error?: string, errorCode?: 'Unentitled' | 'CallUUIDAlreadyExists' | 'FilteredByDoNotDisturb' | 'FilteredByBlockList' | 'Unknown', callUUID: string, handle: string, localizedCallerName: string, hasVideo: '1' | '0', fromPushKit: '1' | '0', payload: object, }; didPerformSetMutedCallAction: { muted: boolean, callUUID: string }; didToggleHoldCallAction: { hold: boolean, callUUID: string }; didChangeAudioRoute: { output: string, reason?: number, handle?: string, callUUID?: string, }; didPerformDTMFAction: { digits: string, callUUID: string }; showIncomingCallUi: { handle: string, callUUID: string, name: string }; silenceIncomingCall: { handle: string, callUUID: string, name: string }; createIncomingConnectionFailed: { handle: string, callUUID: string, name: string }; checkReachability: undefined; didResetProvider: undefined; didLoadWithEvents: InitialEvents; onHasActiveCall : undefined; }

HandleType

'generic' | 'number' | 'email'

NonNullable

Exclude null and undefined from T

T extends null ? never : T

Enums

AudioSessionCategoryOption

| Members | Value | | ------------------------------------------ | ----------------- | | mixWithOthers | 0x1 | | duckOthers | 0x2 | | interruptSpokenAudioAndMixWithOthers | 0x11 | | allowBluetooth | 0x4 | | allowBluetoothA2DP | 0x20 | | allowAirPlay | 0x40 | | defaultToSpeaker | 0x8 | | overrideMutedMicrophoneInterruption | 0x80 |

AudioSessionMode

| Members | Value | | -------------------- | ----------------------------------------------- | | default | 'AVAudioSessionModeDefault' | | gameChat | 'AVAudioSessionModeGameChat' | | measurement | 'AVAudioSessionModeMeasurement' | | moviePlayback | 'AVAudioSessionModeMoviePlayback' | | spokenAudio | 'AVAudioSessionModeSpokenAudio' | | videoChat | 'AVAudioSessionModeVideoChat' | | videoRecording | 'AVAudioSessionModeVideoRecording' | | voiceChat | 'AVAudioSessionModeVoiceChat' | | voicePrompt | 'AVAudioSessionModeVoicePrompt' |