This repository was archived by the owner on Jan 14, 2025. It is now read-only.
This repository was archived by the owner on Jan 14, 2025. It is now read-only.
cancel local notification on android #2122
Closed
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch react-native-push-notification@8.0.0
for the project I'm working on.
due to deprecation of cancelLocalNotifications
in favor of cancelLocalNotification
, the function in component/index.android.js needs to be renamed as well to cancelLocalNotification
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-push-notification/component/index.android.js b/node_modules/react-native-push-notification/component/index.android.js
index 3496c04..0a609cb 100644
--- a/node_modules/react-native-push-notification/component/index.android.js
+++ b/node_modules/react-native-push-notification/component/index.android.js
@@ -36,8 +36,8 @@ NotificationsComponent.prototype.unsubscribeFromTopic = function(topic) {
RNPushNotification.unsubscribeFromTopic(topic);
};
-NotificationsComponent.prototype.cancelLocalNotifications = function(details) {
- RNPushNotification.cancelLocalNotifications(details);
+NotificationsComponent.prototype.cancelLocalNotification = function(details) {
+ RNPushNotification.cancelLocalNotification(details);
};
NotificationsComponent.prototype.clearLocalNotification = function(details, tag) {
This issue body was partially generated by patch-package.
Metadata
Metadata
Assignees
Labels
No labels