From 503a22432d5632bfcbba929551fe900ed19678fe Mon Sep 17 00:00:00 2001 From: NativeScript-Bot Date: Wed, 26 Jun 2024 08:05:53 +0000 Subject: [PATCH] chore(update-plugins): Wed Jun 26 08:05:53 UTC 2024 --- plugins/local-notifications.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/local-notifications.md b/plugins/local-notifications.md index a62b50c..9023da5 100644 --- a/plugins/local-notifications.md +++ b/plugins/local-notifications.md @@ -102,7 +102,8 @@ LocalNotifications.schedule([ icon: 'res://heart', image: 'https://cdn-images-1.medium.com/max/1200/1*c3cQvYJrVezv_Az0CoDcbA.jpeg', thumbnail: true, - interval: 'minute', + interval: { minute: 15 }, // repeat the notification every 15 minutes + displayImmediately: true, // display the notification immediately when using a ScheduleIntervalObject channel: 'My Channel', // default: 'Channel' sound: isAndroid ? 'customsound' : 'customsound.wav', at: new Date(new Date().getTime() + 10 * 1000) // 10 seconds from now @@ -176,7 +177,7 @@ Schedules the specified [scheduleOptions](#scheduleoptions) notification(s), if #### ScheduleOptions | Property | Type | Description | -| :-------------------------- | :------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| :-------------------------- | :------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | `number` | _Optional_: A unique notification identifier. Will be generated if not set. | | `title` | `string` | _Optional_: The title that is shown in the statusbar. | | `subtitle` | `string` | _Optional_: Shown below the title on iOS, and next to the App name on Android. Default not set. All android and iOS `>= 10` only. | @@ -189,11 +190,12 @@ Schedules the specified [scheduleOptions](#scheduleoptions) notification(s), if | `at` | `Date` | _Optional_: A JavaScript Date object indicating when the notification should be shown. Default not set (the notification will be shown immediately). | | `badge` | `boolean` | _Optional_: On iOS (and some Android devices) you see a number on top of the app icon. On most Android devices you'll see this number in the notification center. Default not set (0). | | `sound` | `string` | _Optional_: Notification sound. For custom notification sound, copy the file to `App_Resources/iOS` and `App_Resources/Android/src/main/res/raw`. Set this to "default" (or do not set at all) in order to use default OS sound. Set this to `null` to suppress sound. | -| `interval` | `ScheduleInterval` | _Optional_: Sets to one of `second`, `minute`, `hour`, `day`, `week`, `month`, `year`, number (in days) if you want a recurring notification. | +| `interval` | `ScheduleInterval` `ScheduleIntervalObject` | _Optional_: Using `ScheduleInterval` sets to one of `second`, `minute`, `hour`, `day`, `week`, `month`, `year`, number (in days) if you want a recurring notification when using `at`.

Using `ScheduleIntervalObject` an object of `{ [ScheduleInterval]: number }` to display a notifcation after the interval has elapsed and repeated indefinitely until cancelled.

**Note**: iOS 10+
The minimum interval required is 60 seconds. | +| `displayImmediately` | `boolean` | _Optional_: Will display a scheduled notification immediately when defining an `interval` with `ScheduleIntervalObject` | | `icon` | `string` | _Optional_: On Android you can set a custom icon in the system tray. Pass in `res://filename` (without the extension) which lives in `App_Resouces/Android/drawable` folders. If not passed, we'll look there for a file named `ic_stat_notify.png`. By default the app icon is used. Android < Lollipop (21) only (see `silhouetteIcon` below). See [icon and silhouetteIcon Options (Android-only)](#icon-and-silhouetteicon-options-android-only) for more details | | `silhouetteIcon` | `string` | _Optional_: Same as `icon`, but should be an alpha-only image and will be used in Android >= Lollipop (21). Defaults to `res://ic_stat_notify_silhouette`, or the app icon if not present. See [icon and silhouetteIcon Options (Android-only)](#icon-and-silhouetteicon-options-android-only) for more details | | `image` | `string` | _Optional_: A url of the image to use as an expandable notification image. On Android this is mutually exclusive with `bigTextStyle`. | -| `thumbnail` | `boolean` \| `string` | _Optional_: (`Android-only`)Custom thumbnail/icon to show in the notification center (to the right) on Android, this can be either: `true` (if you want to use the `image` as the thumbnail), a resource URL (that lives in the `App_Resouces/Android/drawable` folders, e.g.: `res://filename`), or a http URL from anywhere on the web. Default not set. | +| `thumbnail` | `boolean` | `string` | _Optional_: (`Android-only`)Custom thumbnail/icon to show in the notification center (to the right) on Android, this can be either: `true` (if you want to use the `image` as the thumbnail), a resource URL (that lives in the `App_Resouces/Android/drawable` folders, e.g.: `res://filename`), or a http URL from anywhere on the web. Default not set. | | `ongoing` | `boolean` | _Optional_: (`Android-only`) Sets whether the notification is `ongoing`. Ongoing notifications cannot be dismissed by the user, so your application must take care of canceling them. | | `channel` | `string` | _Optional_: Sets the channel name for `Android API >= 26`, which is shown when the user longpresses a notification. Default is `Channel`. | | `forceShowWhenInForeground` | `boolean` | _Optional_: Indicates whether to always show the notification. On iOS < 10 this is ignored (the notification is not shown), and on newer Androids it's currently ignored as well (the notification always shows, per platform default). |