Trying to get action click event in push notification, for this i have user below method
import PushNotification from 'react-native-push-notification';import PushNotificationIOS from '@react-native-community/push-notification-ios';import PushNotificationAndroid from 'react-native-push-notification';PushNotificationAndroid.registerNotificationActions(actions);DeviceEventEmitter.addListener('notificationActionReceived', function ( action, ) { console.log('Notification action received: '+ action); const info = JSON.parse(action.dataJSON); if (info.action == 'Accept') { // Do work pertaining to Accept action here } else if (info.action == 'Reject') { // Do work pertaining to Reject action here } });
While sending push notification, i am getting below error:
TypeError: _reactNativePushNotification.default.registerNotificationActions is not a function. (In '_reactNativePushNotification.default.registerNotificationActions(actions)', '_reactNativePushNotification.default.registerNotificationActions' is undefined)r