reminder-handler
v0.0.1
Published
... A Capacitor plugin to schedule and manage full-screen alarm and reminder notifications on Android.
Readme
reminder-handler
... A Capacitor plugin to schedule and manage full-screen alarm and reminder notifications on Android.
Install
npm install reminder-handler
npx cap syncAPI
echo(...)checkPermission()checkIntentExtras()checkAlarmOpened()checkAlarmDismissed()setAlarm(...)cancelAlarm()requestPermission()addListener('alarmAction', ...)removeAllListeners()- Interfaces
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>| Param | Type |
| ------------- | ------------------------------- |
| options | { value: string; } |
Returns: Promise<{ value: string; }>
checkPermission()
checkPermission() => Promise<PermissionResponse>Returns: Promise<PermissionResponse>
checkIntentExtras()
checkIntentExtras() => Promise<IntentExtrasResponse>Returns: Promise<IntentExtrasResponse>
checkAlarmOpened()
checkAlarmOpened() => Promise<AlarmOpenedResponse>Returns: Promise<AlarmOpenedResponse>
checkAlarmDismissed()
checkAlarmDismissed() => Promise<AlarmDismissedResponse>Returns: Promise<AlarmDismissedResponse>
setAlarm(...)
setAlarm(options: { delay: number; title: string; message: string; id?: string; openButtonText?: string; }) => Promise<AlarmResponse>| Param | Type |
| ------------- | ----------------------------------------------------------------------------------------------------- |
| options | { delay: number; title: string; message: string; id?: string; openButtonText?: string; } |
Returns: Promise<AlarmResponse>
cancelAlarm()
cancelAlarm() => Promise<AlarmResponse>Returns: Promise<AlarmResponse>
requestPermission()
requestPermission() => Promise<void>addListener('alarmAction', ...)
addListener(eventName: 'alarmAction', listenerFunc: (data: AlarmActionData) => void) => Promise<PluginListenerHandle>| Param | Type |
| ------------------ | ------------------------------------------------------------------------------ |
| eventName | 'alarmAction' |
| listenerFunc | (data: AlarmActionData) => void |
Returns: Promise<PluginListenerHandle>
removeAllListeners()
removeAllListeners() => Promise<void>Interfaces
PermissionResponse
| Prop | Type |
| ------------------- | -------------------- |
| hasPermission | boolean |
IntentExtrasResponse
| Prop | Type |
| --------------- | -------------------- |
| triggered | boolean |
| opened | boolean |
| title | string |
| message | string |
| timestamp | number |
AlarmOpenedResponse
| Prop | Type |
| --------------- | -------------------- |
| opened | boolean |
| title | string |
| message | string |
| timestamp | number |
AlarmDismissedResponse
| Prop | Type |
| --------------- | -------------------- |
| dismissed | boolean |
| title | string |
| message | string |
| timestamp | number |
AlarmResponse
| Prop | Type |
| ----------------- | -------------------- |
| success | boolean |
| message | string |
| triggerTime | number |
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
AlarmActionData
| Prop | Type |
| -------------------- | ------------------- |
| action | string |
| notificationId | string |
| title | string |
| message | string |
| snoozeMinutes | number |
