@anuradev/capacitor-phone-call-push-notification
v7.2.0
Published
Capacitor plugin for phone call push notifications
Readme
@anuradev/capacitor-phone-call-push-notification
Capacitor plugin for phone call push notifications
Install
npm install @anuradev/capacitor-phone-call-push-notification
npx cap syncAPI
checkPermissions()requestPermissions()getData()register(...)unregister()addListener('onNewToken', ...)addListener('onNewData', ...)- Interfaces
- Type Aliases
checkPermissions()
checkPermissions() => Promise<PermissionStatus>Returns: Promise<any>
requestPermissions()
requestPermissions() => Promise<PermissionStatus>Returns: Promise<any>
getData()
getData() => Promise<{ response: string; origin: string; timestamp: number; }>Returns: Promise<{ response: string; origin: string; timestamp: number; }>
register(...)
register(data?: Partial<NotificationSettings> | undefined) => Promise<void>| Param | Type |
| ---------- | ----------------------------------------------------------------------------------------------------------- |
| data | Partial<NotificationSettings> |
unregister()
unregister() => Promise<void>addListener('onNewToken', ...)
addListener(eventName: 'onNewToken', listenerFunc: (data: { value: string; }) => void) => Promise<PluginListenerHandle>| Param | Type |
| ------------------ | -------------------------------------------------- |
| eventName | 'onNewToken' |
| listenerFunc | (data: { value: string; }) => void |
Returns: Promise<PluginListenerHandle>
addListener('onNewData', ...)
addListener(eventName: 'onNewData', listenerFunc: (data: { data: Record<string, string>; }) => void) => Promise<PluginListenerHandle>| Param | Type |
| ------------------ | --------------------------------------------------------------------------------------------- |
| eventName | 'onNewData' |
| listenerFunc | (data: { data: Record<string, string>; }) => void |
Returns: Promise<PluginListenerHandle>
Interfaces
NotificationSettings
| Prop | Type |
| ------------------------ | ------------------- |
| icon | string |
| picture | string |
| declineButtonText | string |
| declineButtonColor | string |
| answerButtonText | string |
| answerButtonColor | string |
| color | string |
| channelName | string |
| channelDescription | string |
| callingNameKey | string |
| callingNumberKey | string |
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
Type Aliases
Partial
Make all properties in T optional
{ [P in keyof T]?: T[P]; }
Record
Construct a type with a set of properties K of type T
{ [P in K]: T; }
