2.0.6 • Published 9 months ago

@anuradev/capacitor-phone-call-notification v2.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@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>
ParamType
dataPartial<NotificationSettings>

hide(...)

hide(data: { type: NotificationType; }) => Promise<void>
ParamType
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
ParamType
eventName'response'
listenerFunc(data: { response: NotificationResponse; }) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


removeAllListeners()

removeAllListeners() => Promise<void>

Interfaces

NotificationSettings

PropType
typeNotificationType
durationnumber
callerNamestring
callerNumberstring
iconstring
picturestring
thereIsACallInProgressboolean
declineButtonTextstring
declineButtonColorstring
answerButtonTextstring
answerButtonColorstring
terminateButtonTextstring
terminateButtonColorstring
holdButtonTextstring
holdButtonColorstring
terminateAndAnswerButtonTextstring
terminateAndAnswerButtonColorstring
declineSecondCallButtonTextstring
declineSecondCallButtonColorstring
holdAndAnswerButtonTextstring
holdAndAnswerButtonColorstring
colorstring
channelNamestring
channelDescriptionstring

PermissionStatus

PropType
displayPermissionState

PluginListenerHandle

PropType
remove() => Promise<void>

Type Aliases

Partial

Make all properties in T optional

{ P in keyof T?: TP; }

NotificationType

'incoming' | 'inProgress' | 'missed'

PermissionState

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

NotificationResponse

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

1.3.4

10 months ago

2.0.3

10 months ago

2.0.5

9 months ago

2.0.4

9 months ago

2.0.6

9 months ago

1.3.3

11 months ago

1.3.2

11 months ago

2.0.2

11 months ago

2.0.1

11 months ago

2.0.0

12 months ago

1.3.1

12 months ago

1.3.0

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago