@anuradev/capacitor-phone-call-notification
v7.5.5
Published
Capacitor plugin to create phone call notifications
Downloads
144
Readme
@anuradev/capacitor-phone-call-notification
Capacitor plugin to create phone call notifications
Install
npm install @anuradev/capacitor-phone-call-notification
npx cap syncAPI
showIncomingPhoneCallNotification(...)showCallInProgressNotification(...)hideIncomingPhoneCallNotification()hideCallInProgressNotification()checkNotificationsPermission()requestNotificationsPermission()addListener('response', ...)removeAllListeners()- Interfaces
- Type Aliases
showIncomingPhoneCallNotification(...)
showIncomingPhoneCallNotification(data?: Partial<IncomingPhoneCallNotificationSettings> | undefined) => Promise<void>| Param | Type |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| data | Partial<IncomingPhoneCallNotificationSettings> |
showCallInProgressNotification(...)
showCallInProgressNotification(data?: Partial<CallInProgressNotificationSettings> | undefined) => Promise<void>| Param | Type |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| data | Partial<CallInProgressNotificationSettings> |
hideIncomingPhoneCallNotification()
hideIncomingPhoneCallNotification() => Promise<void>hideCallInProgressNotification()
hideCallInProgressNotification() => Promise<void>checkNotificationsPermission()
checkNotificationsPermission() => Promise<NotificationPermissionStatus>Returns: Promise<NotificationPermissionStatus>
requestNotificationsPermission()
requestNotificationsPermission() => Promise<NotificationPermissionStatus>Returns: Promise<NotificationPermissionStatus>
addListener('response', ...)
addListener(eventName: 'response', listenerFunc: (data: { response: NotificationResponse; }) => void) => Promise<PluginListenerHandle>| Param | Type |
| ------------------ | ------------------------------------------------------------------------------------------------------- |
| eventName | 'response' |
| listenerFunc | (data: { response: NotificationResponse; }) => void |
Returns: Promise<PluginListenerHandle>
removeAllListeners()
removeAllListeners() => Promise<void>Interfaces
IncomingPhoneCallNotificationSettings
| Prop | Type |
| ----------------------------------- | -------------------- |
| icon | string |
| picture | string |
| callWaiting | boolean |
| declineButtonText | string |
| declineButtonColor | string |
| answerButtonText | string |
| answerButtonColor | string |
| terminateAndAnswerButtonText | string |
| terminateAndAnswerButtonColor | string |
| terminateButtonText | string |
| terminateButtonColor | string |
| declineCallWaitingButtonText | string |
| declineCallWaitingButtonColor | string |
| holdButtonText | string |
| holdButtonColor | string |
| holdAndAnswerButtonText | string |
| holdAndAnswerButtonColor | string |
| color | string |
| duration | number |
| channelName | string |
| channelDescription | string |
| callingName | string |
| callingNumber | string |
CallInProgressNotificationSettings
| Prop | Type |
| -------------------------- | ------------------- |
| icon | string |
| picture | string |
| terminateButtonText | string |
| terminateButtonColor | string |
| holdButtonText | string |
| holdButtonColor | string |
| color | string |
| duration | number |
| channelName | string |
| channelDescription | string |
| callingName | string |
| callingNumber | string |
NotificationPermissionStatus
| Prop | Type |
| ------------------- | ----------------------------------------------------------- |
| notifications | PermissionState |
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
Type Aliases
Partial
Make all properties in T optional
{ [P in keyof T]?: T[P]; }
PermissionState
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'
NotificationResponse
'tap' | 'answer' | 'decline' | 'terminate' | 'hold'
