Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 503a224

Browse files
chore(update-plugins): Wed Jun 26 08:05:53 UTC 2024
1 parent 6931b6e commit 503a224

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎plugins/local-notifications.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ LocalNotifications.schedule([
102102
icon: 'res://heart',
103103
image: 'https://cdn-images-1.medium.com/max/1200/1*c3cQvYJrVezv_Az0CoDcbA.jpeg',
104104
thumbnail: true,
105-
interval: 'minute',
105+
interval: { minute: 15 }, // repeat the notification every 15 minutes
106+
displayImmediately: true, // display the notification immediately when using a ScheduleIntervalObject
106107
channel: 'My Channel', // default: 'Channel'
107108
sound: isAndroid ? 'customsound' : 'customsound.wav',
108109
at: new Date(new Date().getTime() + 10 * 1000) // 10 seconds from now
@@ -176,7 +177,7 @@ Schedules the specified [scheduleOptions](#scheduleoptions) notification(s), if
176177
#### ScheduleOptions
177178

178179
| Property | Type | Description |
179-
| :-------------------------- | :------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
180+
| :-------------------------- | :------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
180181
| `id` | `number` | _Optional_: A unique notification identifier. Will be generated if not set. |
181182
| `title` | `string` | _Optional_: The title that is shown in the statusbar. |
182183
| `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
189190
| `at` | `Date` | _Optional_: A JavaScript Date object indicating when the notification should be shown. Default not set (the notification will be shown immediately). |
190191
| `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). |
191192
| `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. |
192-
| `interval` | `ScheduleInterval` | _Optional_: Sets to one of `second`, `minute`, `hour`, `day`, `week`, `month`, `year`, number (in days) if you want a recurring notification. |
193+
| `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. |
194+
| `displayImmediately` | `boolean` | _Optional_: Will display a scheduled notification immediately when defining an `interval` with `ScheduleIntervalObject` |
193195
| `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 |
194196
| `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 |
195197
| `image` | `string` | _Optional_: A url of the image to use as an expandable notification image. On Android this is mutually exclusive with `bigTextStyle`. |
196-
| `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. |
198+
| `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. |
197199
| `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. |
198200
| `channel` | `string` | _Optional_: Sets the channel name for `Android API >= 26`, which is shown when the user longpresses a notification. Default is `Channel`. |
199201
| `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). |

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /