critical-alerts
v0.0.4
Published
Plugin for iOS Critical Alerts
Readme
critical-alerts
Plugin for Critical Alerts in IOS & ANDROID
Install
npm install critical-alerts
npx cap syncAPI
echo(...)requestPermission()checkPermission()openAppSettings()checkDndAccess()openDndSettings()createChannel(...)deleteAllChannel()- Interfaces
- Type Aliases
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>| Param | Type |
| ------------- | ------------------------------- |
| options | { value: string; } |
Returns: Promise<{ value: string; }>
requestPermission()
requestPermission() => Promise<{ granted: boolean; }>Returns: Promise<{ granted: boolean; }>
checkPermission()
checkPermission() => Promise<{ authorized: boolean; criticalAlert: boolean; }>Returns: Promise<{ authorized: boolean; criticalAlert: boolean; }>
openAppSettings()
openAppSettings() => Promise<{ granted: boolean; }>Returns: Promise<{ granted: boolean; }>
checkDndAccess()
checkDndAccess() => Promise<{ granted: boolean; }>Returns: Promise<{ granted: boolean; }>
openDndSettings()
openDndSettings() => Promise<{ granted: boolean; }>Returns: Promise<{ granted: boolean; }>
createChannel(...)
createChannel(channel: Channel) => Promise<void>| Param | Type |
| ------------- | ------------------------------------------- |
| channel | Channel |
deleteAllChannel()
deleteAllChannel() => Promise<void>Interfaces
Channel
| Prop | Type | Description | Default | Since |
| ----------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ----- |
| id | string | The channel identifier. | | 1.0.0 |
| name | string | The human-friendly name of this channel (presented to the user). | | 1.0.0 |
| description | string | The description of this channel (presented to the user). | | 1.0.0 |
| sound | string | The sound that should be played for notifications posted to this channel. Notification channels with an importance of at least 3 should have a sound. The file name of a sound file should be specified relative to the android app res/raw directory. | | 1.0.0 |
| importance | Importance | The level of interruption for notifications posted to this channel. | 3 | 1.0.0 |
| visibility | Visibility | The visibility of notifications posted to this channel. This setting is for whether notifications posted to this channel appear on the lockscreen or not, and if so, whether they appear in a redacted form. | | 1.0.0 |
| lights | boolean | Whether notifications posted to this channel should display notification lights, on devices that support it. | | 1.0.0 |
| lightColor | string | The light color for notifications posted to this channel. Only supported if lights are enabled on this channel and the device supports it. Supported color formats are #RRGGBB and #RRGGBBAA. | | 1.0.0 |
| vibration | boolean | Whether notifications posted to this channel should vibrate. | | 1.0.0 |
| bypassDnd | boolean | Whether notifications posted in dnd or doze mode . | | 1.0.0 |
Type Aliases
Importance
1 | 2 | 3 | 4 | 5
Visibility
-1 | 0 | 1
