2.0.6 • Published 9 months ago
@anuradev/capacitor-phone-call-notification v2.0.6
@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(...)
hide(...)
checkPermissions()
requestPermissions()
addListener('response', ...)
removeAllListeners()
- Interfaces
- Type Aliases
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?: 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