Skip to content

Commit

Permalink
chore(update-plugins): Wed Jun 26 08:05:53 UTC 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
nativescript-oss committed Jun 26, 2024
1 parent 6931b6e commit 503a224
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions plugins/local-notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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. |
Expand All @@ -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`. <br /><br /> Using `ScheduleIntervalObject` an object of `{ [ScheduleInterval]: number }` to display a notifcation after the interval has elapsed and repeated indefinitely until cancelled.<br /><br />**Note**: iOS 10+<br />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). |
Expand Down

0 comments on commit 503a224

Please sign in to comment.