diff --git a/local-notifications/README.md b/local-notifications/README.md
index eddce330e..73ac624f6 100644
--- a/local-notifications/README.md
+++ b/local-notifications/README.md
@@ -42,7 +42,7 @@ The Local Notifications can be configured with the following options:
| ------------------------- | -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| **`smallIcon`** | string | Set the default status bar icon for notifications. Icons should be placed in your app's `res/drawable` folder. The value for this option should be the drawable resource ID, which is the filename without an extension. Only available for Android. | 1.0.0 |
| **`iconColor`** | string | Set the default color of status bar icons for notifications. Only available for Android. | 1.0.0 |
-| **`sound`** | string | Set the default notification sound for notifications. On Android 8+ it sets the default channel sound and can't be changed unless the app is uninstalled. If the audio file is not found, it will result in the default system sound being played on Android 7.x and no sound on Android 8+. Only available for Android. | 1.0.0 |
+| **`sound`** | string | Set the default notification sound for notifications. It sets the default channel sound and can't be changed unless the app is uninstalled. If the audio file is not found, it will result in no sound. Only available for Android. | 1.0.0 |
| **`presentationOptions`** | LocalNotificationPresentationOption[] | 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 notification is received - `banner`: the notification is displayed as a banner - `list`: the notification is displayed in the notification center An empty array can be provided if none of the options are desired. Only available for iOS. | 8.2.0 |
### Examples
@@ -456,31 +456,31 @@ The object that describes a local notification.
#### LocalNotificationSchema
-| Prop | Type | Description | Since |
-| ----------------------- | --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
-| **`title`** | string | The title of the notification. | 1.0.0 |
-| **`body`** | string | The body of the notification, shown below the title. | 1.0.0 |
-| **`largeBody`** | string | Sets a multiline text block for display in a big text notification style. | 1.0.0 |
-| **`summaryText`** | string | Used to set the summary text detail in inbox and big text notification styles. Only available for Android. | 1.0.0 |
-| **`id`** | number | The notification identifier. On Android it's a 32-bit int. So the value should be between -2147483648 and 2147483647 inclusive. | 1.0.0 |
-| **`schedule`** | Schedule | Schedule this notification for a later time. | 1.0.0 |
-| **`sound`** | string | Name of the audio file to play when this notification is displayed. Include the file extension with the filename. On iOS, the file should be in the app bundle. On Android, the file should be in res/raw folder. Recommended format is `.wav` because is supported by both iOS and Android. Only available for iOS and Android 7.x. For Android 8+ use channelId of a channel configured with the desired sound. If the sound file is not found, (i.e. empty string or wrong name) the default system notification sound will be used. If not provided, it will produce the default sound on Android and no sound on iOS. | 1.0.0 |
-| **`smallIcon`** | string | Set a custom status bar icon. If set, this overrides the `smallIcon` option from Capacitor configuration. Icons should be placed in your app's `res/drawable` folder. The value for this option should be the drawable resource ID, which is the filename without an extension. Only available for Android. | 1.0.0 |
-| **`largeIcon`** | string | Set a large icon for notifications. Icons should be placed in your app's `res/drawable` folder. The value for this option should be the drawable resource ID, which is the filename without an extension. Only available for Android. | 1.0.0 |
-| **`iconColor`** | string | Set the color of the notification icon. Only available for Android. | 1.0.0 |
-| **`attachments`** | Attachment[] | Set attachments for this notification. | 1.0.0 |
-| **`actionTypeId`** | string | Associate an action type with this notification. | 1.0.0 |
-| **`extra`** | any | Set extra data to store within this notification. | 1.0.0 |
-| **`threadIdentifier`** | string | Used to group multiple notifications. Sets `threadIdentifier` on the [`UNMutableNotificationContent`](https://developer.apple.com/documentation/usernotifications/unmutablenotificationcontent). Only available for iOS. | 1.0.0 |
-| **`relevanceScore`** | number | The score the system uses to determine if the notification is the featured notification when the system groups the app's notifications. The value must be between 0 and 1, where 0 is the least relevant and 1 is the most relevant. The default value is 0. Sets `relevanceScore` on the [`UNMutableNotificationContent`](https://developer.apple.com/documentation/usernotifications/unmutablenotificationcontent). Only available for iOS. | 8.1.0 |
-| **`interruptionLevel`** | InterruptionLevel | The interruption level that indicates the priority and delivery timing of a notification. Sets `interruptionLevel` on the [`UNMutableNotificationContent`](https://developer.apple.com/documentation/usernotifications/unmutablenotificationcontent). Only available for iOS. | 8.1.0 |
-| **`group`** | string | Used to group multiple notifications. Calls `setGroup()` on [`NotificationCompat.Builder`](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder) with the provided value. Only available for Android. | 1.0.0 |
-| **`groupSummary`** | boolean | If true, this notification becomes the summary for a group of notifications. Calls `setGroupSummary()` on [`NotificationCompat.Builder`](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder) with the provided value. Only available for Android when using `group`. | 1.0.0 |
-| **`channelId`** | string | Specifies the channel the notification should be delivered on. If channel with the given name does not exist then the notification will not fire. If not provided, it will use the default channel. Calls `setChannelId()` on [`NotificationCompat.Builder`](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder) with the provided value. Only available for Android 8+. | 1.0.0 |
-| **`ongoing`** | boolean | If true, the notification can't be swiped away. Calls `setOngoing()` on [`NotificationCompat.Builder`](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder) with the provided value. Only available for Android. | 1.0.0 |
-| **`autoCancel`** | boolean | If true, the notification is canceled when the user clicks on it. Calls `setAutoCancel()` on [`NotificationCompat.Builder`](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder) with the provided value. Only available for Android. | 1.0.0 |
-| **`inboxList`** | string[] | Sets a list of strings for display in an inbox style notification. Up to 5 strings are allowed. Only available for Android. | 1.0.0 |
-| **`silent`** | boolean | If true, notification will not appear while app is in the foreground. Only available for iOS. | 5.0.0 |
+| Prop | Type | Description | Since |
+| ----------------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
+| **`title`** | string | The title of the notification. | 1.0.0 |
+| **`body`** | string | The body of the notification, shown below the title. | 1.0.0 |
+| **`largeBody`** | string | Sets a multiline text block for display in a big text notification style. | 1.0.0 |
+| **`summaryText`** | string | Used to set the summary text detail in inbox and big text notification styles. Only available for Android. | 1.0.0 |
+| **`id`** | number | The notification identifier. On Android it's a 32-bit int. So the value should be between -2147483648 and 2147483647 inclusive. | 1.0.0 |
+| **`schedule`** | Schedule | Schedule this notification for a later time. | 1.0.0 |
+| **`sound`** | string | Name of the audio file to play when this notification is displayed. Include the file extension with the filename. The file should be in the app bundle. Recommended format is `.wav`. Only available for iOS. For Android, use channelId of a channel configured with the desired sound. If the sound file is not found, (i.e. empty string or wrong name) the default system notification sound will be used. If not provided, it will produce no sound. | 1.0.0 |
+| **`smallIcon`** | string | Set a custom status bar icon. If set, this overrides the `smallIcon` option from Capacitor configuration. Icons should be placed in your app's `res/drawable` folder. The value for this option should be the drawable resource ID, which is the filename without an extension. Only available for Android. | 1.0.0 |
+| **`largeIcon`** | string | Set a large icon for notifications. Icons should be placed in your app's `res/drawable` folder. The value for this option should be the drawable resource ID, which is the filename without an extension. Only available for Android. | 1.0.0 |
+| **`iconColor`** | string | Set the color of the notification icon. Only available for Android. | 1.0.0 |
+| **`attachments`** | Attachment[] | Set attachments for this notification. | 1.0.0 |
+| **`actionTypeId`** | string | Associate an action type with this notification. | 1.0.0 |
+| **`extra`** | any | Set extra data to store within this notification. | 1.0.0 |
+| **`threadIdentifier`** | string | Used to group multiple notifications. Sets `threadIdentifier` on the [`UNMutableNotificationContent`](https://developer.apple.com/documentation/usernotifications/unmutablenotificationcontent). Only available for iOS. | 1.0.0 |
+| **`relevanceScore`** | number | The score the system uses to determine if the notification is the featured notification when the system groups the app's notifications. The value must be between 0 and 1, where 0 is the least relevant and 1 is the most relevant. The default value is 0. Sets `relevanceScore` on the [`UNMutableNotificationContent`](https://developer.apple.com/documentation/usernotifications/unmutablenotificationcontent). Only available for iOS. | 8.1.0 |
+| **`interruptionLevel`** | InterruptionLevel | The interruption level that indicates the priority and delivery timing of a notification. Sets `interruptionLevel` on the [`UNMutableNotificationContent`](https://developer.apple.com/documentation/usernotifications/unmutablenotificationcontent). Only available for iOS. | 8.1.0 |
+| **`group`** | string | Used to group multiple notifications. Calls `setGroup()` on [`NotificationCompat.Builder`](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder) with the provided value. Only available for Android. | 1.0.0 |
+| **`groupSummary`** | boolean | If true, this notification becomes the summary for a group of notifications. Calls `setGroupSummary()` on [`NotificationCompat.Builder`](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder) with the provided value. Only available for Android when using `group`. | 1.0.0 |
+| **`channelId`** | string | Specifies the channel the notification should be delivered on. If channel with the given name does not exist then the notification will not fire. If not provided, it will use the default channel. Calls `setChannelId()` on [`NotificationCompat.Builder`](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder) with the provided value. Only available for Android. | 1.0.0 |
+| **`ongoing`** | boolean | If true, the notification can't be swiped away. Calls `setOngoing()` on [`NotificationCompat.Builder`](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder) with the provided value. Only available for Android. | 1.0.0 |
+| **`autoCancel`** | boolean | If true, the notification is canceled when the user clicks on it. Calls `setAutoCancel()` on [`NotificationCompat.Builder`](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder) with the provided value. Only available for Android. | 1.0.0 |
+| **`inboxList`** | string[] | Sets a list of strings for display in an inbox style notification. Up to 5 strings are allowed. Only available for Android. | 1.0.0 |
+| **`silent`** | boolean | If true, notification will not appear while app is in the foreground. Only available for iOS. | 5.0.0 |
#### Schedule
diff --git a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationManager.java b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationManager.java
index 0b826a546..a521128d7 100644
--- a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationManager.java
+++ b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationManager.java
@@ -101,27 +101,23 @@ public JSObject handleNotificationActionPerformed(Intent data, NotificationStora
* Create notification channel
*/
public void createNotificationChannel() {
- // Create the NotificationChannel, but only on API 26+ because
- // the NotificationChannel class is new and not in the support library
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
- CharSequence name = "Default";
- String description = "Default";
- int importance = android.app.NotificationManager.IMPORTANCE_DEFAULT;
- NotificationChannel channel = new NotificationChannel(DEFAULT_NOTIFICATION_CHANNEL_ID, name, importance);
- channel.setDescription(description);
- AudioAttributes audioAttributes = new AudioAttributes.Builder()
- .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
- .setUsage(AudioAttributes.USAGE_ALARM)
- .build();
- Uri soundUri = this.getDefaultSoundUrl(context);
- if (soundUri != null) {
- channel.setSound(soundUri, audioAttributes);
- }
- // Register the channel with the system; you can't change the importance
- // or other notification behaviors after this
- android.app.NotificationManager notificationManager = context.getSystemService(android.app.NotificationManager.class);
- notificationManager.createNotificationChannel(channel);
+ CharSequence name = "Default";
+ String description = "Default";
+ int importance = android.app.NotificationManager.IMPORTANCE_DEFAULT;
+ NotificationChannel channel = new NotificationChannel(DEFAULT_NOTIFICATION_CHANNEL_ID, name, importance);
+ channel.setDescription(description);
+ AudioAttributes audioAttributes = new AudioAttributes.Builder()
+ .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
+ .setUsage(AudioAttributes.USAGE_ALARM)
+ .build();
+ Uri soundUri = this.getDefaultSoundUrl(context);
+ if (soundUri != null) {
+ channel.setSound(soundUri, audioAttributes);
}
+ // Register the channel with the system; you can't change the importance
+ // or other notification behaviors after this
+ android.app.NotificationManager notificationManager = context.getSystemService(android.app.NotificationManager.class);
+ notificationManager.createNotificationChannel(channel);
}
@Nullable
diff --git a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/NotificationChannelManager.java b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/NotificationChannelManager.java
index b2ea880f8..cf0b9e947 100644
--- a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/NotificationChannelManager.java
+++ b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/NotificationChannelManager.java
@@ -40,104 +40,90 @@ public NotificationChannelManager(Context context, NotificationManager manager)
private static String CHANNEL_LIGHT_COLOR = "lightColor";
public void createChannel(PluginCall call) {
- if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
- JSObject channel = new JSObject();
- if (call.getString(CHANNEL_ID) != null) {
- channel.put(CHANNEL_ID, call.getString(CHANNEL_ID));
- } else {
- call.reject("Channel missing identifier");
- return;
- }
- if (call.getString(CHANNEL_NAME) != null) {
- channel.put(CHANNEL_NAME, call.getString(CHANNEL_NAME));
- } else {
- call.reject("Channel missing name");
- return;
- }
-
- channel.put(CHANNEL_IMPORTANCE, call.getInt(CHANNEL_IMPORTANCE, NotificationManager.IMPORTANCE_DEFAULT));
- channel.put(CHANNEL_DESCRIPTION, call.getString(CHANNEL_DESCRIPTION, ""));
- channel.put(CHANNEL_VISIBILITY, call.getInt(CHANNEL_VISIBILITY, NotificationCompat.VISIBILITY_PUBLIC));
- channel.put(CHANNEL_SOUND, call.getString(CHANNEL_SOUND, null));
- channel.put(CHANNEL_VIBRATE, call.getBoolean(CHANNEL_VIBRATE, false));
- channel.put(CHANNEL_USE_LIGHTS, call.getBoolean(CHANNEL_USE_LIGHTS, false));
- channel.put(CHANNEL_LIGHT_COLOR, call.getString(CHANNEL_LIGHT_COLOR, null));
- createChannel(channel);
- call.resolve();
+ JSObject channel = new JSObject();
+ if (call.getString(CHANNEL_ID) != null) {
+ channel.put(CHANNEL_ID, call.getString(CHANNEL_ID));
} else {
- call.unavailable();
+ call.reject("Channel missing identifier");
+ return;
}
+ if (call.getString(CHANNEL_NAME) != null) {
+ channel.put(CHANNEL_NAME, call.getString(CHANNEL_NAME));
+ } else {
+ call.reject("Channel missing name");
+ return;
+ }
+
+ channel.put(CHANNEL_IMPORTANCE, call.getInt(CHANNEL_IMPORTANCE, NotificationManager.IMPORTANCE_DEFAULT));
+ channel.put(CHANNEL_DESCRIPTION, call.getString(CHANNEL_DESCRIPTION, ""));
+ channel.put(CHANNEL_VISIBILITY, call.getInt(CHANNEL_VISIBILITY, NotificationCompat.VISIBILITY_PUBLIC));
+ channel.put(CHANNEL_SOUND, call.getString(CHANNEL_SOUND, null));
+ channel.put(CHANNEL_VIBRATE, call.getBoolean(CHANNEL_VIBRATE, false));
+ channel.put(CHANNEL_USE_LIGHTS, call.getBoolean(CHANNEL_USE_LIGHTS, false));
+ channel.put(CHANNEL_LIGHT_COLOR, call.getString(CHANNEL_LIGHT_COLOR, null));
+ createChannel(channel);
+ call.resolve();
}
public void createChannel(JSObject channel) {
- if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
- NotificationChannel notificationChannel = new NotificationChannel(
- channel.getString(CHANNEL_ID),
- channel.getString(CHANNEL_NAME),
- channel.getInteger(CHANNEL_IMPORTANCE)
- );
- notificationChannel.setDescription(channel.getString(CHANNEL_DESCRIPTION));
- notificationChannel.setLockscreenVisibility(channel.getInteger(CHANNEL_VISIBILITY));
- notificationChannel.enableVibration(channel.getBool(CHANNEL_VIBRATE));
- notificationChannel.enableLights(channel.getBool(CHANNEL_USE_LIGHTS));
- String lightColor = channel.getString(CHANNEL_LIGHT_COLOR);
- if (lightColor != null) {
- try {
- notificationChannel.setLightColor(Color.parseColor(lightColor));
- } catch (IllegalArgumentException ex) {
- Logger.error(Logger.tags("NotificationChannel"), "Invalid color provided for light color.", null);
- }
+ NotificationChannel notificationChannel = new NotificationChannel(
+ channel.getString(CHANNEL_ID),
+ channel.getString(CHANNEL_NAME),
+ channel.getInteger(CHANNEL_IMPORTANCE)
+ );
+ notificationChannel.setDescription(channel.getString(CHANNEL_DESCRIPTION));
+ notificationChannel.setLockscreenVisibility(channel.getInteger(CHANNEL_VISIBILITY));
+ notificationChannel.enableVibration(channel.getBool(CHANNEL_VIBRATE));
+ notificationChannel.enableLights(channel.getBool(CHANNEL_USE_LIGHTS));
+ String lightColor = channel.getString(CHANNEL_LIGHT_COLOR);
+ if (lightColor != null) {
+ try {
+ notificationChannel.setLightColor(Color.parseColor(lightColor));
+ } catch (IllegalArgumentException ex) {
+ Logger.error(Logger.tags("NotificationChannel"), "Invalid color provided for light color.", null);
}
- String sound = channel.getString(CHANNEL_SOUND, null);
- if (sound != null && !sound.isEmpty()) {
- if (sound.contains(".")) {
- sound = sound.substring(0, sound.lastIndexOf('.'));
- }
- AudioAttributes audioAttributes = new AudioAttributes.Builder()
- .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
- .setUsage(AudioAttributes.USAGE_NOTIFICATION)
- .build();
- Uri soundUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + context.getPackageName() + "/raw/" + sound);
- notificationChannel.setSound(soundUri, audioAttributes);
+ }
+ String sound = channel.getString(CHANNEL_SOUND, null);
+ if (sound != null && !sound.isEmpty()) {
+ if (sound.contains(".")) {
+ sound = sound.substring(0, sound.lastIndexOf('.'));
}
- notificationManager.createNotificationChannel(notificationChannel);
+ AudioAttributes audioAttributes = new AudioAttributes.Builder()
+ .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
+ .setUsage(AudioAttributes.USAGE_NOTIFICATION)
+ .build();
+ Uri soundUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + context.getPackageName() + "/raw/" + sound);
+ notificationChannel.setSound(soundUri, audioAttributes);
}
+ notificationManager.createNotificationChannel(notificationChannel);
}
public void deleteChannel(PluginCall call) {
- if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
- String channelId = call.getString("id");
- notificationManager.deleteNotificationChannel(channelId);
- call.resolve();
- } else {
- call.unavailable();
- }
+ String channelId = call.getString("id");
+ notificationManager.deleteNotificationChannel(channelId);
+ call.resolve();
}
public void listChannels(PluginCall call) {
- if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
- List notificationChannels = notificationManager.getNotificationChannels();
- JSArray channels = new JSArray();
- for (NotificationChannel notificationChannel : notificationChannels) {
- JSObject channel = new JSObject();
- channel.put(CHANNEL_ID, notificationChannel.getId());
- channel.put(CHANNEL_NAME, notificationChannel.getName());
- channel.put(CHANNEL_DESCRIPTION, notificationChannel.getDescription());
- channel.put(CHANNEL_IMPORTANCE, notificationChannel.getImportance());
- channel.put(CHANNEL_VISIBILITY, notificationChannel.getLockscreenVisibility());
- channel.put(CHANNEL_SOUND, notificationChannel.getSound());
- channel.put(CHANNEL_VIBRATE, notificationChannel.shouldVibrate());
- channel.put(CHANNEL_USE_LIGHTS, notificationChannel.shouldShowLights());
- channel.put(CHANNEL_LIGHT_COLOR, String.format("#%06X", (0xFFFFFF & notificationChannel.getLightColor())));
- Logger.debug(Logger.tags("NotificationChannel"), "visibility " + notificationChannel.getLockscreenVisibility());
- Logger.debug(Logger.tags("NotificationChannel"), "importance " + notificationChannel.getImportance());
- channels.put(channel);
- }
- JSObject result = new JSObject();
- result.put("channels", channels);
- call.resolve(result);
- } else {
- call.unavailable();
+ List notificationChannels = notificationManager.getNotificationChannels();
+ JSArray channels = new JSArray();
+ for (NotificationChannel notificationChannel : notificationChannels) {
+ JSObject channel = new JSObject();
+ channel.put(CHANNEL_ID, notificationChannel.getId());
+ channel.put(CHANNEL_NAME, notificationChannel.getName());
+ channel.put(CHANNEL_DESCRIPTION, notificationChannel.getDescription());
+ channel.put(CHANNEL_IMPORTANCE, notificationChannel.getImportance());
+ channel.put(CHANNEL_VISIBILITY, notificationChannel.getLockscreenVisibility());
+ channel.put(CHANNEL_SOUND, notificationChannel.getSound());
+ channel.put(CHANNEL_VIBRATE, notificationChannel.shouldVibrate());
+ channel.put(CHANNEL_USE_LIGHTS, notificationChannel.shouldShowLights());
+ channel.put(CHANNEL_LIGHT_COLOR, String.format("#%06X", (0xFFFFFF & notificationChannel.getLightColor())));
+ Logger.debug(Logger.tags("NotificationChannel"), "visibility " + notificationChannel.getLockscreenVisibility());
+ Logger.debug(Logger.tags("NotificationChannel"), "importance " + notificationChannel.getImportance());
+ channels.put(channel);
}
+ JSObject result = new JSObject();
+ result.put("channels", channels);
+ call.resolve(result);
}
}
diff --git a/local-notifications/src/definitions.ts b/local-notifications/src/definitions.ts
index 577cb8390..3e8f78728 100644
--- a/local-notifications/src/definitions.ts
+++ b/local-notifications/src/definitions.ts
@@ -37,11 +37,10 @@ declare module '@capacitor/cli' {
/**
* Set the default notification sound for notifications.
*
- * On Android 8+ it sets the default channel sound and can't be
+ * It sets the default channel sound and can't be
* changed unless the app is uninstalled.
*
- * If the audio file is not found, it will result in the default system
- * sound being played on Android 7.x and no sound on Android 8+.
+ * If the audio file is not found, it will result in no sound.
*
* Only available for Android.
*
@@ -602,17 +601,16 @@ export interface LocalNotificationSchema {
*
* Include the file extension with the filename.
*
- * On iOS, the file should be in the app bundle.
- * On Android, the file should be in res/raw folder.
+ * The file should be in the app bundle.
*
- * Recommended format is `.wav` because is supported by both iOS and Android.
+ * Recommended format is `.wav`.
*
- * Only available for iOS and Android 7.x.
- * For Android 8+ use channelId of a channel configured with the desired sound.
+ * Only available for iOS.
+ * For Android, use channelId of a channel configured with the desired sound.
*
* If the sound file is not found, (i.e. empty string or wrong name)
* the default system notification sound will be used.
- * If not provided, it will produce the default sound on Android and no sound on iOS.
+ * If not provided, it will produce no sound.
*
* @since 1.0.0
*/
@@ -754,7 +752,7 @@ export interface LocalNotificationSchema {
* [`NotificationCompat.Builder`](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder)
* with the provided value.
*
- * Only available for Android 8+.
+ * Only available for Android.
*
* @since 1.0.0
*/