@capacitor/push-notifications 8.0.4 → 8.0.5-dev-2529-20260515T105025.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -87,9 +87,9 @@ From Android 8.0 (API level 26) and higher, notification channels are supported
87
87
 
88
88
  You can configure the way the push notifications are displayed when the app is in foreground.
89
89
 
90
- | Prop | Type | Description | Since |
91
- | ------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
92
- | **`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 An empty array can be provided if none of the options are desired. badge is only available for iOS. | 1.0.0 |
90
+ | Prop | Type | Description | Since |
91
+ | ------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
92
+ | **`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 |
93
93
 
94
94
  ### Examples
95
95
 
@@ -99,7 +99,7 @@ In `capacitor.config.json`:
99
99
  {
100
100
  "plugins": {
101
101
  "PushNotifications": {
102
- "presentationOptions": ["badge", "sound", "alert"]
102
+ "presentationOptions": ["badge", "sound", "alert", "banner", "list"]
103
103
  }
104
104
  }
105
105
  }
@@ -115,7 +115,7 @@ import { CapacitorConfig } from '@capacitor/cli';
115
115
  const config: CapacitorConfig = {
116
116
  plugins: {
117
117
  PushNotifications: {
118
- presentationOptions: ["badge", "sound", "alert"],
118
+ presentationOptions: ["badge", "sound", "alert", "banner", "list"],
119
119
  },
120
120
  },
121
121
  };
@@ -20,6 +20,7 @@ import com.google.firebase.messaging.FirebaseMessaging;
20
20
  import com.google.firebase.messaging.NotificationParams;
21
21
  import com.google.firebase.messaging.RemoteMessage;
22
22
  import java.util.Arrays;
23
+ import java.util.List;
23
24
  import org.json.JSONException;
24
25
  import org.json.JSONObject;
25
26
 
@@ -247,7 +248,8 @@ public class PushNotificationsPlugin extends Plugin {
247
248
  String body = notification.getBody();
248
249
  String[] presentation = getConfig().getArray("presentationOptions");
249
250
  if (presentation != null) {
250
- if (Arrays.asList(presentation).contains("alert")) {
251
+ List<String> presentationList = Arrays.asList(presentation);
252
+ if (presentationList.contains("alert") || presentationList.contains("banner") || presentationList.contains("list")) {
251
253
  Bundle bundle = null;
252
254
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
253
255
  try {
package/dist/docs.json CHANGED
@@ -870,11 +870,11 @@
870
870
  "name": "since"
871
871
  },
872
872
  {
873
- "text": "[\"badge\", \"sound\", \"alert\"]",
873
+ "text": "[\"badge\", \"sound\", \"alert\", \"banner\", \"list\"]",
874
874
  "name": "example"
875
875
  }
876
876
  ],
877
- "docs": "This is an array of strings you can combine. Possible values in the array are:\n - `badge`: badge count on the app icon is updated (default value)\n - `sound`: the device will ring/vibrate when the push notification is received\n - `alert`: the push notification is displayed in a native dialog\n\nAn empty array can be provided if none of the options are desired.\n\nbadge is only available for iOS.",
877
+ "docs": "This is an array of strings you can combine. Possible values in the array are:\n - `badge`: badge count on the app icon is updated (default value)\n - `sound`: the device will ring/vibrate when the push notification is received\n - `alert`: **Deprecated on iOS.** Use `banner` and `list` instead. On Android, this value is still used to display the notification.\n - `banner`: the push notification is displayed as a banner. On Android, defaults to the same behavior as `alert`.\n - `list`: the push notification is displayed in the notification center. On Android, defaults to the same behavior as `alert`.\n\nAn empty array can be provided if none of the options are desired.\n\nbadge is only available for iOS.",
878
878
  "complexTypes": [
879
879
  "PresentationOption"
880
880
  ],
@@ -1,5 +1,5 @@
1
1
  import type { PermissionState, PluginListenerHandle } from '@capacitor/core';
2
- export type PresentationOption = 'badge' | 'sound' | 'alert';
2
+ export type PresentationOption = 'badge' | 'sound' | 'alert' | 'banner' | 'list';
3
3
  declare module '@capacitor/cli' {
4
4
  interface PluginsConfig {
5
5
  /**
@@ -10,14 +10,16 @@ declare module '@capacitor/cli' {
10
10
  * This is an array of strings you can combine. Possible values in the array are:
11
11
  * - `badge`: badge count on the app icon is updated (default value)
12
12
  * - `sound`: the device will ring/vibrate when the push notification is received
13
- * - `alert`: the push notification is displayed in a native dialog
13
+ * - `alert`: **Deprecated on iOS.** Use `banner` and `list` instead. On Android, this value is still used to display the notification.
14
+ * - `banner`: the push notification is displayed as a banner. On Android, defaults to the same behavior as `alert`.
15
+ * - `list`: the push notification is displayed in the notification center. On Android, defaults to the same behavior as `alert`.
14
16
  *
15
17
  * An empty array can be provided if none of the options are desired.
16
18
  *
17
19
  * badge is only available for iOS.
18
20
  *
19
21
  * @since 1.0.0
20
- * @example ["badge", "sound", "alert"]
22
+ * @example ["badge", "sound", "alert", "banner", "list"]
21
23
  */
22
24
  presentationOptions: PresentationOption[];
23
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,wCAAwC","sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n\nimport type { PermissionState, PluginListenerHandle } from '@capacitor/core';\n\nexport type PresentationOption = 'badge' | 'sound' | 'alert';\n\ndeclare module '@capacitor/cli' {\n export interface PluginsConfig {\n /**\n * You can configure the way the push notifications are displayed when the app is in foreground.\n */\n PushNotifications?: {\n /**\n * This is an array of strings you can combine. Possible values in the array are:\n * - `badge`: badge count on the app icon is updated (default value)\n * - `sound`: the device will ring/vibrate when the push notification is received\n * - `alert`: the push notification is displayed in a native dialog\n *\n * An empty array can be provided if none of the options are desired.\n *\n * badge is only available for iOS.\n *\n * @since 1.0.0\n * @example [\"badge\", \"sound\", \"alert\"]\n */\n presentationOptions: PresentationOption[];\n };\n }\n}\n\nexport interface PushNotificationsPlugin {\n /**\n * Register the app to receive push notifications.\n *\n * This method will trigger the `'registration'` event with the push token or\n * `'registrationError'` if there was a problem. It does not prompt the user for\n * notification permissions, use `requestPermissions()` first.\n *\n * @since 1.0.0\n */\n register(): Promise<void>;\n\n /**\n * Unregister the app from push notifications.\n *\n * This will delete a firebase token on Android, and unregister APNS on iOS.\n *\n * @since 5.0.0\n */\n unregister(): Promise<void>;\n\n /**\n * Get a list of notifications that are visible on the notifications screen.\n *\n * @since 1.0.0\n */\n getDeliveredNotifications(): Promise<DeliveredNotifications>;\n\n /**\n * Remove the specified notifications from the notifications screen.\n *\n * @since 1.0.0\n */\n removeDeliveredNotifications(delivered: DeliveredNotifications): Promise<void>;\n\n /**\n * Remove all the notifications from the notifications screen.\n *\n * @since 1.0.0\n */\n removeAllDeliveredNotifications(): Promise<void>;\n\n /**\n * Create a notification channel.\n *\n * Only available on Android O or newer (SDK 26+).\n *\n * @since 1.0.0\n */\n createChannel(channel: Channel): Promise<void>;\n\n /**\n * Delete a notification channel.\n *\n * Only available on Android O or newer (SDK 26+).\n *\n * @since 1.0.0\n */\n deleteChannel(args: { id: string }): Promise<void>;\n\n /**\n * List the available notification channels.\n *\n * Only available on Android O or newer (SDK 26+).\n *\n * @since 1.0.0\n */\n listChannels(): Promise<ListChannelsResult>;\n\n /**\n * Check permission to receive push notifications.\n *\n * On Android 12 and below the status is always granted because you can always\n * receive push notifications. If you need to check if the user allows\n * to display notifications, use local-notifications plugin.\n *\n * @since 1.0.0\n */\n checkPermissions(): Promise<PermissionStatus>;\n\n /**\n * Request permission to receive push notifications.\n *\n * On Android 12 and below it doesn't prompt for permission because you can always\n * receive push notifications.\n *\n * On iOS, the first time you use the function, it will prompt the user\n * for push notification permission and return granted or denied based\n * on the user selection. On following calls it will get the current status of\n * the permission without prompting again.\n *\n * @since 1.0.0\n */\n requestPermissions(): Promise<PermissionStatus>;\n\n /**\n * Called when the push notification registration finishes without problems.\n *\n * Provides the push notification token.\n *\n * @since 1.0.0\n */\n addListener(eventName: 'registration', listenerFunc: (token: Token) => void): Promise<PluginListenerHandle>;\n\n /**\n * Called when the push notification registration finished with problems.\n *\n * Provides an error with the registration problem.\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'registrationError',\n listenerFunc: (error: RegistrationError) => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Called when the device receives a push notification.\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'pushNotificationReceived',\n listenerFunc: (notification: PushNotificationSchema) => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Called when an action is performed on a push notification.\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'pushNotificationActionPerformed',\n listenerFunc: (notification: ActionPerformed) => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Remove all native listeners for this plugin.\n *\n * @since 1.0.0\n */\n removeAllListeners(): Promise<void>;\n}\n\nexport interface PushNotificationSchema {\n /**\n * The notification title.\n *\n * @since 1.0.0\n */\n title?: string;\n\n /**\n * The notification subtitle.\n *\n * @since 1.0.0\n */\n subtitle?: string;\n\n /**\n * The main text payload for the notification.\n *\n * @since 1.0.0\n */\n body?: string;\n\n /**\n * The notification identifier.\n *\n * @since 1.0.0\n */\n id: string;\n\n /**\n * The notification tag.\n *\n * Only available on Android (from push notifications).\n *\n * @since 4.0.0\n */\n tag?: string;\n\n /**\n * The number to display for the app icon badge.\n *\n * @since 1.0.0\n */\n badge?: number;\n\n /**\n * It's not being returned.\n *\n * @deprecated will be removed in next major version.\n * @since 1.0.0\n */\n notification?: any;\n\n /**\n * Any additional data that was included in the\n * push notification payload.\n *\n * @since 1.0.0\n */\n data: any;\n\n /**\n * The action to be performed on the user opening the notification.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n */\n click_action?: string;\n\n /**\n * Deep link from the notification.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n */\n link?: string;\n\n /**\n * Set the group identifier for notification grouping.\n *\n * Only available on Android. Works like `threadIdentifier` on iOS.\n *\n * @since 1.0.0\n */\n group?: string;\n\n /**\n * Designate this notification as the summary for an associated `group`.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n */\n groupSummary?: boolean;\n}\n\nexport interface ActionPerformed {\n /**\n * The action performed on the notification.\n *\n * @since 1.0.0\n */\n actionId: string;\n\n /**\n * Text entered on the notification action.\n *\n * Only available on iOS.\n *\n * @since 1.0.0\n */\n inputValue?: string;\n\n /**\n * The notification in which the action was performed.\n *\n * @since 1.0.0\n */\n notification: PushNotificationSchema;\n}\n\nexport interface Token {\n /**\n * On iOS it contains the APNS token.\n * On Android it contains the FCM token.\n *\n * @since 1.0.0\n */\n value: string;\n}\n\nexport interface RegistrationError {\n /**\n * Error message describing the registration failure.\n *\n * @since 4.0.0\n */\n error: string;\n}\n\nexport interface DeliveredNotifications {\n /**\n * List of notifications that are visible on the\n * notifications screen.\n *\n * @since 1.0.0\n */\n notifications: PushNotificationSchema[];\n}\n\nexport interface Channel {\n /**\n * The channel identifier.\n *\n * @since 1.0.0\n */\n id: string;\n\n /**\n * The human-friendly name of this channel (presented to the user).\n *\n * @since 1.0.0\n */\n name: string;\n\n /**\n * The description of this channel (presented to the user).\n *\n * @since 1.0.0\n */\n description?: string;\n\n /**\n * The sound that should be played for notifications posted to this channel.\n *\n * Notification channels with an importance of at least `3` should have a\n * sound.\n *\n * The file name of a sound file should be specified relative to the android\n * app `res/raw` directory.\n *\n * @since 1.0.0\n * @example \"jingle.wav\"\n */\n sound?: string;\n\n /**\n * The level of interruption for notifications posted to this channel.\n *\n * @default `3`\n * @since 1.0.0\n */\n importance?: Importance;\n\n /**\n * The visibility of notifications posted to this channel.\n *\n * This setting is for whether notifications posted to this channel appear on\n * the lockscreen or not, and if so, whether they appear in a redacted form.\n *\n * @since 1.0.0\n */\n visibility?: Visibility;\n\n /**\n * Whether notifications posted to this channel should display notification\n * lights, on devices that support it.\n *\n * @since 1.0.0\n */\n lights?: boolean;\n\n /**\n * The light color for notifications posted to this channel.\n *\n * Only supported if lights are enabled on this channel and the device\n * supports it.\n *\n * Supported color formats are `#RRGGBB` and `#RRGGBBAA`.\n *\n * @since 1.0.0\n */\n lightColor?: string;\n\n /**\n * Whether notifications posted to this channel should vibrate.\n *\n * @since 1.0.0\n */\n vibration?: boolean;\n}\n\n/**\n * The importance level. For more details, see the [Android Developer Docs](https://developer.android.com/reference/android/app/NotificationManager#IMPORTANCE_DEFAULT)\n * @since 1.0.0\n */\nexport type Importance = 0 | 1 | 2 | 3 | 4 | 5;\n\n/**\n * The notification visibility. For more details, see the [Android Developer Docs](https://developer.android.com/reference/androidx/core/app/NotificationCompat#VISIBILITY_PRIVATE)\n * @since 1.0.0\n */\nexport type Visibility = -1 | 0 | 1;\n\nexport interface ListChannelsResult {\n /**\n * List of all the Channels created by your app.\n *\n * @since 1.0.0\n */\n channels: Channel[];\n}\n\nexport interface PermissionStatus {\n /**\n * Permission state of receiving notifications.\n *\n * @since 1.0.0\n */\n receive: PermissionState;\n}\n\n/**\n * @deprecated Use 'Channel`.\n * @since 1.0.0\n */\nexport type NotificationChannel = Channel;\n\n/**\n * @deprecated Use `ListChannelsResult`.\n * @since 1.0.0\n */\nexport type NotificationChannelList = ListChannelsResult;\n\n/**\n * @deprecated Use `PushNotificationSchema`.\n * @since 1.0.0\n */\nexport type PushNotification = PushNotificationSchema;\n\n/**\n * @deprecated Use `ActionPerformed`.\n * @since 1.0.0\n */\nexport type PushNotificationActionPerformed = ActionPerformed;\n\n/**\n * @deprecated Use `DeliveredNotifications`.\n * @since 1.0.0\n */\nexport type PushNotificationDeliveredList = DeliveredNotifications;\n\n/**\n * @deprecated Use `Token`.\n * @since 1.0.0\n */\nexport type PushNotificationToken = Token;\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,wCAAwC","sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n\nimport type { PermissionState, PluginListenerHandle } from '@capacitor/core';\n\nexport type PresentationOption = 'badge' | 'sound' | 'alert' | 'banner' | 'list';\n\ndeclare module '@capacitor/cli' {\n export interface PluginsConfig {\n /**\n * You can configure the way the push notifications are displayed when the app is in foreground.\n */\n PushNotifications?: {\n /**\n * This is an array of strings you can combine. Possible values in the array are:\n * - `badge`: badge count on the app icon is updated (default value)\n * - `sound`: the device will ring/vibrate when the push notification is received\n * - `alert`: **Deprecated on iOS.** Use `banner` and `list` instead. On Android, this value is still used to display the notification.\n * - `banner`: the push notification is displayed as a banner. On Android, defaults to the same behavior as `alert`.\n * - `list`: the push notification is displayed in the notification center. On Android, defaults to the same behavior as `alert`.\n *\n * An empty array can be provided if none of the options are desired.\n *\n * badge is only available for iOS.\n *\n * @since 1.0.0\n * @example [\"badge\", \"sound\", \"alert\", \"banner\", \"list\"]\n */\n presentationOptions: PresentationOption[];\n };\n }\n}\n\nexport interface PushNotificationsPlugin {\n /**\n * Register the app to receive push notifications.\n *\n * This method will trigger the `'registration'` event with the push token or\n * `'registrationError'` if there was a problem. It does not prompt the user for\n * notification permissions, use `requestPermissions()` first.\n *\n * @since 1.0.0\n */\n register(): Promise<void>;\n\n /**\n * Unregister the app from push notifications.\n *\n * This will delete a firebase token on Android, and unregister APNS on iOS.\n *\n * @since 5.0.0\n */\n unregister(): Promise<void>;\n\n /**\n * Get a list of notifications that are visible on the notifications screen.\n *\n * @since 1.0.0\n */\n getDeliveredNotifications(): Promise<DeliveredNotifications>;\n\n /**\n * Remove the specified notifications from the notifications screen.\n *\n * @since 1.0.0\n */\n removeDeliveredNotifications(delivered: DeliveredNotifications): Promise<void>;\n\n /**\n * Remove all the notifications from the notifications screen.\n *\n * @since 1.0.0\n */\n removeAllDeliveredNotifications(): Promise<void>;\n\n /**\n * Create a notification channel.\n *\n * Only available on Android O or newer (SDK 26+).\n *\n * @since 1.0.0\n */\n createChannel(channel: Channel): Promise<void>;\n\n /**\n * Delete a notification channel.\n *\n * Only available on Android O or newer (SDK 26+).\n *\n * @since 1.0.0\n */\n deleteChannel(args: { id: string }): Promise<void>;\n\n /**\n * List the available notification channels.\n *\n * Only available on Android O or newer (SDK 26+).\n *\n * @since 1.0.0\n */\n listChannels(): Promise<ListChannelsResult>;\n\n /**\n * Check permission to receive push notifications.\n *\n * On Android 12 and below the status is always granted because you can always\n * receive push notifications. If you need to check if the user allows\n * to display notifications, use local-notifications plugin.\n *\n * @since 1.0.0\n */\n checkPermissions(): Promise<PermissionStatus>;\n\n /**\n * Request permission to receive push notifications.\n *\n * On Android 12 and below it doesn't prompt for permission because you can always\n * receive push notifications.\n *\n * On iOS, the first time you use the function, it will prompt the user\n * for push notification permission and return granted or denied based\n * on the user selection. On following calls it will get the current status of\n * the permission without prompting again.\n *\n * @since 1.0.0\n */\n requestPermissions(): Promise<PermissionStatus>;\n\n /**\n * Called when the push notification registration finishes without problems.\n *\n * Provides the push notification token.\n *\n * @since 1.0.0\n */\n addListener(eventName: 'registration', listenerFunc: (token: Token) => void): Promise<PluginListenerHandle>;\n\n /**\n * Called when the push notification registration finished with problems.\n *\n * Provides an error with the registration problem.\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'registrationError',\n listenerFunc: (error: RegistrationError) => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Called when the device receives a push notification.\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'pushNotificationReceived',\n listenerFunc: (notification: PushNotificationSchema) => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Called when an action is performed on a push notification.\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'pushNotificationActionPerformed',\n listenerFunc: (notification: ActionPerformed) => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Remove all native listeners for this plugin.\n *\n * @since 1.0.0\n */\n removeAllListeners(): Promise<void>;\n}\n\nexport interface PushNotificationSchema {\n /**\n * The notification title.\n *\n * @since 1.0.0\n */\n title?: string;\n\n /**\n * The notification subtitle.\n *\n * @since 1.0.0\n */\n subtitle?: string;\n\n /**\n * The main text payload for the notification.\n *\n * @since 1.0.0\n */\n body?: string;\n\n /**\n * The notification identifier.\n *\n * @since 1.0.0\n */\n id: string;\n\n /**\n * The notification tag.\n *\n * Only available on Android (from push notifications).\n *\n * @since 4.0.0\n */\n tag?: string;\n\n /**\n * The number to display for the app icon badge.\n *\n * @since 1.0.0\n */\n badge?: number;\n\n /**\n * It's not being returned.\n *\n * @deprecated will be removed in next major version.\n * @since 1.0.0\n */\n notification?: any;\n\n /**\n * Any additional data that was included in the\n * push notification payload.\n *\n * @since 1.0.0\n */\n data: any;\n\n /**\n * The action to be performed on the user opening the notification.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n */\n click_action?: string;\n\n /**\n * Deep link from the notification.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n */\n link?: string;\n\n /**\n * Set the group identifier for notification grouping.\n *\n * Only available on Android. Works like `threadIdentifier` on iOS.\n *\n * @since 1.0.0\n */\n group?: string;\n\n /**\n * Designate this notification as the summary for an associated `group`.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n */\n groupSummary?: boolean;\n}\n\nexport interface ActionPerformed {\n /**\n * The action performed on the notification.\n *\n * @since 1.0.0\n */\n actionId: string;\n\n /**\n * Text entered on the notification action.\n *\n * Only available on iOS.\n *\n * @since 1.0.0\n */\n inputValue?: string;\n\n /**\n * The notification in which the action was performed.\n *\n * @since 1.0.0\n */\n notification: PushNotificationSchema;\n}\n\nexport interface Token {\n /**\n * On iOS it contains the APNS token.\n * On Android it contains the FCM token.\n *\n * @since 1.0.0\n */\n value: string;\n}\n\nexport interface RegistrationError {\n /**\n * Error message describing the registration failure.\n *\n * @since 4.0.0\n */\n error: string;\n}\n\nexport interface DeliveredNotifications {\n /**\n * List of notifications that are visible on the\n * notifications screen.\n *\n * @since 1.0.0\n */\n notifications: PushNotificationSchema[];\n}\n\nexport interface Channel {\n /**\n * The channel identifier.\n *\n * @since 1.0.0\n */\n id: string;\n\n /**\n * The human-friendly name of this channel (presented to the user).\n *\n * @since 1.0.0\n */\n name: string;\n\n /**\n * The description of this channel (presented to the user).\n *\n * @since 1.0.0\n */\n description?: string;\n\n /**\n * The sound that should be played for notifications posted to this channel.\n *\n * Notification channels with an importance of at least `3` should have a\n * sound.\n *\n * The file name of a sound file should be specified relative to the android\n * app `res/raw` directory.\n *\n * @since 1.0.0\n * @example \"jingle.wav\"\n */\n sound?: string;\n\n /**\n * The level of interruption for notifications posted to this channel.\n *\n * @default `3`\n * @since 1.0.0\n */\n importance?: Importance;\n\n /**\n * The visibility of notifications posted to this channel.\n *\n * This setting is for whether notifications posted to this channel appear on\n * the lockscreen or not, and if so, whether they appear in a redacted form.\n *\n * @since 1.0.0\n */\n visibility?: Visibility;\n\n /**\n * Whether notifications posted to this channel should display notification\n * lights, on devices that support it.\n *\n * @since 1.0.0\n */\n lights?: boolean;\n\n /**\n * The light color for notifications posted to this channel.\n *\n * Only supported if lights are enabled on this channel and the device\n * supports it.\n *\n * Supported color formats are `#RRGGBB` and `#RRGGBBAA`.\n *\n * @since 1.0.0\n */\n lightColor?: string;\n\n /**\n * Whether notifications posted to this channel should vibrate.\n *\n * @since 1.0.0\n */\n vibration?: boolean;\n}\n\n/**\n * The importance level. For more details, see the [Android Developer Docs](https://developer.android.com/reference/android/app/NotificationManager#IMPORTANCE_DEFAULT)\n * @since 1.0.0\n */\nexport type Importance = 0 | 1 | 2 | 3 | 4 | 5;\n\n/**\n * The notification visibility. For more details, see the [Android Developer Docs](https://developer.android.com/reference/androidx/core/app/NotificationCompat#VISIBILITY_PRIVATE)\n * @since 1.0.0\n */\nexport type Visibility = -1 | 0 | 1;\n\nexport interface ListChannelsResult {\n /**\n * List of all the Channels created by your app.\n *\n * @since 1.0.0\n */\n channels: Channel[];\n}\n\nexport interface PermissionStatus {\n /**\n * Permission state of receiving notifications.\n *\n * @since 1.0.0\n */\n receive: PermissionState;\n}\n\n/**\n * @deprecated Use 'Channel`.\n * @since 1.0.0\n */\nexport type NotificationChannel = Channel;\n\n/**\n * @deprecated Use `ListChannelsResult`.\n * @since 1.0.0\n */\nexport type NotificationChannelList = ListChannelsResult;\n\n/**\n * @deprecated Use `PushNotificationSchema`.\n * @since 1.0.0\n */\nexport type PushNotification = PushNotificationSchema;\n\n/**\n * @deprecated Use `ActionPerformed`.\n * @since 1.0.0\n */\nexport type PushNotificationActionPerformed = ActionPerformed;\n\n/**\n * @deprecated Use `DeliveredNotifications`.\n * @since 1.0.0\n */\nexport type PushNotificationDeliveredList = DeliveredNotifications;\n\n/**\n * @deprecated Use `Token`.\n * @since 1.0.0\n */\nexport type PushNotificationToken = Token;\n"]}
@@ -34,11 +34,15 @@ public class PushNotificationsHandler: NSObject, NotificationHandlerProtocol {
34
34
 
35
35
  optionsArray.forEach { option in
36
36
  switch option {
37
+ case "banner":
38
+ presentationOptions.insert(.banner)
39
+ case "list":
40
+ presentationOptions.insert(.list)
37
41
  case "alert":
38
- presentationOptions.insert(.alert)
42
+ presentationOptions.insert(.banner)
43
+ presentationOptions.insert(.list)
39
44
  case "badge":
40
45
  presentationOptions.insert(.badge)
41
-
42
46
  case "sound":
43
47
  presentationOptions.insert(.sound)
44
48
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/push-notifications",
3
- "version": "8.0.4",
3
+ "version": "8.0.5-dev-2529-20260515T105025.0",
4
4
  "description": "The Push Notifications API provides access to native push notifications.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -81,6 +81,5 @@
81
81
  },
82
82
  "publishConfig": {
83
83
  "access": "public"
84
- },
85
- "gitHead": "6b9b1a2a5a74db5ae63df64ab5e9a2950c2ed4b0"
84
+ }
86
85
  }