Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions push-notifications/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ From Android 8.0 (API level 26) and higher, notification channels are supported

You can configure the way the push notifications are displayed when the app is in foreground.

| Prop | Type | Description | Since |
| ------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| **`presentationOptions`** | <code>PresentationOption[]</code> | This is an array of strings you can combine. Possible values in the array are: - `badge`: badge count on the app icon is updated (default value) - `sound`: the device will ring/vibrate when the push notification is received - `alert`: **Deprecated on iOS.** Use `banner` and `list` instead. On Android, this value is still used to display the notification. - `banner`: the push notification is displayed as a banner. On Android, defaults to the same behavior as `alert`. - `list`: the push notification is displayed in the notification center. On Android, defaults to the same behavior as `alert`. An empty array can be provided if none of the options are desired. badge is only available for iOS. | 1.0.0 |
| Prop | Type | Description | Since |
| ------------------------- | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| **`presentationOptions`** | <code>PresentationOption[]</code> | This is an array of strings you can combine. Possible values in the array are: - `badge`: badge count on the app icon is updated (default value) - `sound`: the device will ring/vibrate when the push notification is received - `alert`: the push notification is displayed in a native dialog. Only available on Android. - `banner`: the push notification is displayed as a banner. On Android, defaults to the same behavior as `alert`. - `list`: the push notification is displayed in the notification center. On Android, defaults to the same behavior as `alert`. An empty array can be provided if none of the options are desired. badge is only available for iOS. | 1.0.0 |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed, slipped me from PR to main, think this readme update for "On Android, defaults to the same behavior as alert" is missing. It's on definitions, but perhaps it was missing a npm run build on the PR to main?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already fixed it, seems to be good now.


### Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ public class PushNotificationsHandler: NSObject, NotificationHandlerProtocol {
presentationOptions.insert(.banner)
case "list":
presentationOptions.insert(.list)
case "alert":
presentationOptions.insert(.banner)
presentationOptions.insert(.list)
case "badge":
presentationOptions.insert(.badge)
case "sound":
Expand Down
2 changes: 1 addition & 1 deletion push-notifications/src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ declare module '@capacitor/cli' {
* This is an array of strings you can combine. Possible values in the array are:
* - `badge`: badge count on the app icon is updated (default value)
* - `sound`: the device will ring/vibrate when the push notification is received
* - `alert`: **Deprecated on iOS.** Use `banner` and `list` instead. On Android, this value is still used to display the notification.
* - `alert`: the push notification is displayed in a native dialog. Only available on Android.
* - `banner`: the push notification is displayed as a banner. On Android, defaults to the same behavior as `alert`.
* - `list`: the push notification is displayed in the notification center. On Android, defaults to the same behavior as `alert`.
*
Expand Down
Loading