Android cancelLocalNotification not working
See original GitHub issueHello,
When I am trying to cancel notification.
PushNotification.cancelLocalNotification(id);
I also used this
PushNotification.cancelLocalNotification({id:id});
I get this error.
TypeError: _reactNativePushNotification.default.cancelLocalNotification is not a function. (In '_reactNativePushNotification.default.cancelLocalNotification(id)', '_reactNativePushNotification.default.cancelLocalNotification' is undefined)
TypeError: _reactNativePushNotification.default.cancelLocalNotification is not a function. (In '_reactNativePushNotification.default.cancelLocalNotification({ id: id })', '_reactNativePushNotification.default.cancelLocalNotification' is undefined)
npm version 6,14,9 node version v15.2 “react-native-push-notification”: “^7.0.0” “react-native”: “0.63.4”,
When I create a schedule.
PushNotification.localNotificationSchedule({ channelId:"channel", // (required) title:"title", invokeApp: true, date: date, id: uu, //uuid string message: "message", allowWhileIdle:false, });
Android Studio properties
`
android {
compileSdkVersion 30
buildToolsVersion “30.0.2”
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion 23
targetSdkVersion 30
versionCode 1
versionName "1.0"
}
`
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top GitHub Comments
@Dallas62 I upgrade to “react-native-push-notification”: “^7.4.0”, But still getting error. I deleted the app and rebuild npx react-native start --reset-cache
If so, clear your cache or provide a full description of your issue.