@anuradev/capacitor-phone-call-notification
TypeScript icon, indicating that this package has built-in type declarations

2.0.6 • Public • Published

@anuradev/capacitor-phone-call-notification

Capacitor plugin to create phone call notifications

Install

npm install @anuradev/capacitor-phone-call-notification
npx cap sync

API

show(...)

show(data?: Partial<NotificationSettings> | undefined) => Promise<void>
Param Type
data Partial<NotificationSettings>

hide(...)

hide(data: { type: NotificationType; }) => Promise<void>
Param Type
data { type: NotificationType; }

checkPermissions()

checkPermissions() => Promise<PermissionStatus>

Returns: Promise<PermissionStatus>


requestPermissions()

requestPermissions() => Promise<PermissionStatus>

Returns: Promise<PermissionStatus>


addListener('response', ...)

addListener(eventName: 'response', listenerFunc: (data: { response: NotificationResponse; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Param Type
eventName 'response'
listenerFunc (data: { response: NotificationResponse; }) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


removeAllListeners()

removeAllListeners() => Promise<void>

Interfaces

NotificationSettings

Prop Type
type NotificationType
duration number
callerName string
callerNumber string
icon string
picture string
thereIsACallInProgress boolean
declineButtonText string
declineButtonColor string
answerButtonText string
answerButtonColor string
terminateButtonText string
terminateButtonColor string
holdButtonText string
holdButtonColor string
terminateAndAnswerButtonText string
terminateAndAnswerButtonColor string
declineSecondCallButtonText string
declineSecondCallButtonColor string
holdAndAnswerButtonText string
holdAndAnswerButtonColor string
color string
channelName string
channelDescription string

PermissionStatus

Prop Type
display PermissionState

PluginListenerHandle

Prop Type
remove () => Promise<void>

Type Aliases

Partial

Make all properties in T optional

{ [P in keyof T]?: T[P]; }

NotificationType

'incoming' | 'inProgress' | 'missed'

PermissionState

'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'

NotificationResponse

'tap' | 'answer' | 'decline' | 'terminate' | 'hold'

Readme

Keywords

Package Sidebar

Install

npm i @anuradev/capacitor-phone-call-notification

Weekly Downloads

2

Version

2.0.6

License

MIT

Unpacked Size

111 kB

Total Files

41

Last publish

Collaborators

  • araso
  • anuradevelopers