@capacitor/local-notifications
Advanced tools
Comparing version 1.1.0 to 4.0.0-beta.0
@@ -6,2 +6,52 @@ # Change Log | ||
# 4.0.0-beta.0 (2022-06-27) | ||
### Bug Fixes | ||
* **local-notifications:** Add FLAG_MUTABLE to pending intents for SDK 31 support ([#914](https://github.com/ionic-team/capacitor-plugins/issues/914)) ([9ad0ce6](https://github.com/ionic-team/capacitor-plugins/commit/9ad0ce6f1497f425db907908be1b125e6ed83dbc)) | ||
* **local-notifications:** Handle case of not allowed exact notifications ([#954](https://github.com/ionic-team/capacitor-plugins/issues/954)) ([5016996](https://github.com/ionic-team/capacitor-plugins/commit/5016996b3a4e9824d8dd2bc4c71892fc5dbc7365)) | ||
* correct addListeners links ([#655](https://github.com/ionic-team/capacitor-plugins/issues/655)) ([f9871e7](https://github.com/ionic-team/capacitor-plugins/commit/f9871e7bd53478addb21155e148829f550c0e457)) | ||
* inline source code in esm map files ([#760](https://github.com/ionic-team/capacitor-plugins/issues/760)) ([a960489](https://github.com/ionic-team/capacitor-plugins/commit/a960489a19db0182b90d187a50deff9dfbe51038)) | ||
* Make removeAllListeners return a promise ([#895](https://github.com/ionic-team/capacitor-plugins/issues/895)) ([e5c49d6](https://github.com/ionic-team/capacitor-plugins/commit/e5c49d64445dca70286334e6a0441d8021197b13)) | ||
* remove postpublish scripts ([#656](https://github.com/ionic-team/capacitor-plugins/issues/656)) ([ed6ac49](https://github.com/ionic-team/capacitor-plugins/commit/ed6ac499ebf4a47525071ccbfc36c27503e11f60)) | ||
* **android:** fire localNotificationReceived event on Android ([#217](https://github.com/ionic-team/capacitor-plugins/issues/217)) ([d97682d](https://github.com/ionic-team/capacitor-plugins/commit/d97682d9f3d6f612993716c3bc35d3015c4e0c07)) | ||
* **local-notification:** Throw unavailable if Notification API not supported ([#285](https://github.com/ionic-team/capacitor-plugins/issues/285)) ([a90a88b](https://github.com/ionic-team/capacitor-plugins/commit/a90a88b217f5fa2a257416050afb476dd84d8051)) | ||
* **local-notifications:** Adding check for `new Notification` support ([#295](https://github.com/ionic-team/capacitor-plugins/issues/295)) ([a806f22](https://github.com/ionic-team/capacitor-plugins/commit/a806f22577209322bdc93ef7fe5490d3b0b6e42f)) | ||
* **local-notifications:** Checking for null schedule in notification JSObject ([#258](https://github.com/ionic-team/capacitor-plugins/issues/258)) ([73cb416](https://github.com/ionic-team/capacitor-plugins/commit/73cb4168329622bb5a6625c900090a01fc5eca99)) | ||
* **local-notifications:** don't store notifications if not scheduled ([#310](https://github.com/ionic-team/capacitor-plugins/issues/310)) ([c1445fd](https://github.com/ionic-team/capacitor-plugins/commit/c1445fddc69db27506f83b3ea56d8e90d4384346)) | ||
* **local-notifications:** extra not being returned on notification events ([#340](https://github.com/ionic-team/capacitor-plugins/issues/340)) ([5b03a7f](https://github.com/ionic-team/capacitor-plugins/commit/5b03a7fdbfd2e8293a9fc3726185b516d7efa9a9)) | ||
* **local-notifications:** Make getPending not return already fired notifications ([#256](https://github.com/ionic-team/capacitor-plugins/issues/256)) ([fb96f8a](https://github.com/ionic-team/capacitor-plugins/commit/fb96f8ab8c4776528e5825be6c2e19567462eef8)) | ||
* **local-notifications:** Opt out of Capacitor date serialization ([#264](https://github.com/ionic-team/capacitor-plugins/issues/264)) ([6e447d5](https://github.com/ionic-team/capacitor-plugins/commit/6e447d54aff3cac47df540addf2a0bf05238c158)) | ||
* **local-notifications:** requestPermissions and checkPermissions return if enabled ([#494](https://github.com/ionic-team/capacitor-plugins/issues/494)) ([555bb1f](https://github.com/ionic-team/capacitor-plugins/commit/555bb1f9bd02ccd999891a316e7ee0f8c1844e92)) | ||
* **local-notifications:** return schedule on as object ([#603](https://github.com/ionic-team/capacitor-plugins/issues/603)) ([ca34b01](https://github.com/ionic-team/capacitor-plugins/commit/ca34b01c73f14bb0ad14e8a501210e42a0e65b04)) | ||
* **local-notifications:** Throw errors if missing mandatory channel fields ([#577](https://github.com/ionic-team/capacitor-plugins/issues/577)) ([6bf3a4f](https://github.com/ionic-team/capacitor-plugins/commit/6bf3a4f0de8880588200ae60e73427fa6959ea20)) | ||
* **local-notifications:** use proper rollup config ([#528](https://github.com/ionic-team/capacitor-plugins/issues/528)) ([cd17daa](https://github.com/ionic-team/capacitor-plugins/commit/cd17daa02241f50299232212ad72722d8a35ee16)) | ||
* normalize use of integers for notification IDs ([#195](https://github.com/ionic-team/capacitor-plugins/issues/195)) ([b56e111](https://github.com/ionic-team/capacitor-plugins/commit/b56e1118227ee58d1872dbb32a18b8484290d3c7)) | ||
* **web:** fix scheduled notifications not being sent ([#220](https://github.com/ionic-team/capacitor-plugins/issues/220)) ([c8e92d6](https://github.com/ionic-team/capacitor-plugins/commit/c8e92d6a178f8b3278b1d3a9c364eb8120d28848)) | ||
* add es2017 lib to tsconfig ([#180](https://github.com/ionic-team/capacitor-plugins/issues/180)) ([2c3776c](https://github.com/ionic-team/capacitor-plugins/commit/2c3776c38ca025c5ee965dec10ccf1cdb6c02e2f)) | ||
* Use the event names from Capacitor 2 ([#215](https://github.com/ionic-team/capacitor-plugins/issues/215)) ([008fe9e](https://github.com/ionic-team/capacitor-plugins/commit/008fe9e9bf6a960b0ab7b6fc4d5014f10ba13df8)) | ||
### Features | ||
* set targetSDK default value to 31 ([#824](https://github.com/ionic-team/capacitor-plugins/issues/824)) ([3ee10de](https://github.com/ionic-team/capacitor-plugins/commit/3ee10de98067984c1a4e75295d001c5a895c47f4)) | ||
* set targetSDK default value to 32 ([#970](https://github.com/ionic-team/capacitor-plugins/issues/970)) ([fa70d96](https://github.com/ionic-team/capacitor-plugins/commit/fa70d96f141af751aae53ceb5642c46b204f5958)) | ||
* Upgrade gradle to 7.4 ([#826](https://github.com/ionic-team/capacitor-plugins/issues/826)) ([5db0906](https://github.com/ionic-team/capacitor-plugins/commit/5db0906f6264287c4f8e69dbaecf19d4d387824b)) | ||
* Use java 11 ([#910](https://github.com/ionic-team/capacitor-plugins/issues/910)) ([5acb2a2](https://github.com/ionic-team/capacitor-plugins/commit/5acb2a288a413492b163e4e97da46a085d9e4be0)) | ||
* **android:** implements Activity Result API changes for permissions and activity results ([#222](https://github.com/ionic-team/capacitor-plugins/issues/222)) ([f671b9f](https://github.com/ionic-team/capacitor-plugins/commit/f671b9f4b472806ef43db6dcf302d4503cf1828c)) | ||
* **local-notifications:** add more info to pending notifications ([#211](https://github.com/ionic-team/capacitor-plugins/issues/211)) ([7c50487](https://github.com/ionic-team/capacitor-plugins/commit/7c50487d40836380a27bd4c8d3655d83e0c3a720)) | ||
* **local-notifications:** Add weekday scheduling support for Android and iOS ([#756](https://github.com/ionic-team/capacitor-plugins/issues/756)) ([430b485](https://github.com/ionic-team/capacitor-plugins/commit/430b48592ce59ccc967dd9a081873d7dc3937e93)) | ||
* **local-notifications:** Adding summary text to grouped notifications ([#296](https://github.com/ionic-team/capacitor-plugins/issues/296)) ([f625bd2](https://github.com/ionic-team/capacitor-plugins/commit/f625bd28bc00dbd0b51d7bdecf5e6f3077dcc7a9)) | ||
* **local-notifications:** Fire local notifications while app is idle ([#237](https://github.com/ionic-team/capacitor-plugins/issues/237)) ([43380ef](https://github.com/ionic-team/capacitor-plugins/commit/43380efa8901adf9d669d0c1ef20038a2fd7df8e)) | ||
* **local-notifications:** Support for Big Text and Inbox Notification Style ([#280](https://github.com/ionic-team/capacitor-plugins/issues/280)) ([dc96ef9](https://github.com/ionic-team/capacitor-plugins/commit/dc96ef923725f5b53346431d35f82d5ff13f4e17)) | ||
* **local-notifications:** Support setting seconds in Schedule "on" ([#253](https://github.com/ionic-team/capacitor-plugins/issues/253)) ([4ec8d06](https://github.com/ionic-team/capacitor-plugins/commit/4ec8d06e0cb52403e541a05e5c3518d4c5ea754e)) | ||
* **web:** implement ActionPerformed and Received events ([#219](https://github.com/ionic-team/capacitor-plugins/issues/219)) ([e062901](https://github.com/ionic-team/capacitor-plugins/commit/e062901fc2e55cf6b6dc1ab20258d80a0be8b2d9)) | ||
* add commonjs output format ([#179](https://github.com/ionic-team/capacitor-plugins/issues/179)) ([8e9e098](https://github.com/ionic-team/capacitor-plugins/commit/8e9e09862064b3f6771d7facbc4008e995d9b463)) | ||
* Local Notifications plugin ([#94](https://github.com/ionic-team/capacitor-plugins/issues/94)) ([e59ba9c](https://github.com/ionic-team/capacitor-plugins/commit/e59ba9ceea78a26ec60e521825f228baa9d74577)) | ||
# [1.1.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/local-notifications@1.0.10...@capacitor/local-notifications@1.1.0) (2022-01-19) | ||
@@ -8,0 +58,0 @@ |
@@ -90,3 +90,3 @@ import type { PermissionState, PluginListenerHandle } from '@capacitor/core'; | ||
*/ | ||
createChannel(channel: NotificationChannel): Promise<void>; | ||
createChannel(channel: Channel): Promise<void>; | ||
/** | ||
@@ -99,3 +99,5 @@ * Delete a notification channel. | ||
*/ | ||
deleteChannel(channel: NotificationChannel): Promise<void>; | ||
deleteChannel(args: { | ||
id: string; | ||
}): Promise<void>; | ||
/** | ||
@@ -798,5 +800,6 @@ * Get a list of notification channels. | ||
* | ||
* @default `3` | ||
* @since 1.0.0 | ||
*/ | ||
importance: Importance; | ||
importance?: Importance; | ||
/** | ||
@@ -803,0 +806,0 @@ * The visibility of notifications posted to this channel. |
{ | ||
"name": "@capacitor/local-notifications", | ||
"version": "1.1.0", | ||
"version": "4.0.0-beta.0", | ||
"description": "The Local Notifications API provides a way to schedule device notifications locally (i.e. without a server sending push notifications).", | ||
@@ -32,3 +32,3 @@ "main": "dist/plugin.cjs.js", | ||
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web", | ||
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..", | ||
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..", | ||
"verify:android": "cd android && ./gradlew clean build test && cd ..", | ||
@@ -49,7 +49,7 @@ "verify:web": "npm run build", | ||
"devDependencies": { | ||
"@capacitor/android": "^3.0.0", | ||
"@capacitor/cli": "^3.0.0", | ||
"@capacitor/core": "^3.0.0", | ||
"@capacitor/android": "next", | ||
"@capacitor/cli": "next", | ||
"@capacitor/core": "next", | ||
"@capacitor/docgen": "0.0.18", | ||
"@capacitor/ios": "^3.0.0", | ||
"@capacitor/ios": "next", | ||
"@ionic/eslint-config": "^0.3.0", | ||
@@ -67,3 +67,3 @@ "@ionic/prettier-config": "~1.0.1", | ||
"peerDependencies": { | ||
"@capacitor/core": "^3.0.0" | ||
"@capacitor/core": "next" | ||
}, | ||
@@ -86,3 +86,3 @@ "prettier": "@ionic/prettier-config", | ||
}, | ||
"gitHead": "f18ee6482e1ec8e5fb0290d51f598397133af990" | ||
"gitHead": "fd7db8285f72990522da0adc889514c9804b6dae" | ||
} |
@@ -12,2 +12,12 @@ # @capacitor/local-notifications | ||
## Android | ||
Starting on Android 12, scheduled notifications won't be exact unless this permission is added to your `AndroidManifest.xml`: | ||
```xml | ||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" /> | ||
``` | ||
Note that even if the permission is present, users can still disable exact notifications from the app settings. | ||
## Configuration | ||
@@ -182,3 +192,3 @@ | ||
```typescript | ||
createChannel(channel: NotificationChannel) => Promise<void> | ||
createChannel(channel: Channel) => Promise<void> | ||
``` | ||
@@ -202,3 +212,3 @@ | ||
```typescript | ||
deleteChannel(channel: NotificationChannel) => Promise<void> | ||
deleteChannel(args: { id: string; }) => Promise<void> | ||
``` | ||
@@ -210,5 +220,5 @@ | ||
| Param | Type | | ||
| ------------- | ------------------------------------------- | | ||
| **`channel`** | <code><a href="#channel">Channel</a></code> | | ||
| Param | Type | | ||
| ---------- | ---------------------------- | | ||
| **`args`** | <code>{ id: string; }</code> | | ||
@@ -546,13 +556,13 @@ **Since:** 1.0.0 | ||
| Prop | Type | Description | Since | | ||
| ----------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | | ||
| **`id`** | <code>string</code> | The channel identifier. | 1.0.0 | | ||
| **`name`** | <code>string</code> | The human-friendly name of this channel (presented to the user). | 1.0.0 | | ||
| **`description`** | <code>string</code> | The description of this channel (presented to the user). | 1.0.0 | | ||
| **`sound`** | <code>string</code> | 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. If the sound is not provided, or the sound file is not found no sound will be used. | 1.0.0 | | ||
| **`importance`** | <code><a href="#importance">Importance</a></code> | The level of interruption for notifications posted to this channel. | 1.0.0 | | ||
| **`visibility`** | <code><a href="#visibility">Visibility</a></code> | 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`** | <code>boolean</code> | Whether notifications posted to this channel should display notification lights, on devices that support it. | 1.0.0 | | ||
| **`lightColor`** | <code>string</code> | 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`** | <code>boolean</code> | Whether notifications posted to this channel should vibrate. | 1.0.0 | | ||
| Prop | Type | Description | Default | Since | | ||
| ----------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ----- | | ||
| **`id`** | <code>string</code> | The channel identifier. | | 1.0.0 | | ||
| **`name`** | <code>string</code> | The human-friendly name of this channel (presented to the user). | | 1.0.0 | | ||
| **`description`** | <code>string</code> | The description of this channel (presented to the user). | | 1.0.0 | | ||
| **`sound`** | <code>string</code> | 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. If the sound is not provided, or the sound file is not found no sound will be used. | | 1.0.0 | | ||
| **`importance`** | <code><a href="#importance">Importance</a></code> | The level of interruption for notifications posted to this channel. | <code>`3`</code> | 1.0.0 | | ||
| **`visibility`** | <code><a href="#visibility">Visibility</a></code> | 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`** | <code>boolean</code> | Whether notifications posted to this channel should display notification lights, on devices that support it. | | 1.0.0 | | ||
| **`lightColor`** | <code>string</code> | 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`** | <code>boolean</code> | Whether notifications posted to this channel should vibrate. | | 1.0.0 | | ||
@@ -598,7 +608,2 @@ | ||
#### NotificationChannel | ||
<code><a href="#channel">Channel</a></code> | ||
#### Importance | ||
@@ -605,0 +610,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
375951
39
638
3911
2
1