Closed aalindQuantel closed 1 year ago
Related to #11338
@cwomack no it’s a completely different issue in android devices i am not able to use pushnotifications as no function is running related to Notifications prop
Thanks for the clarity @aalindQuantel, just saw your comment on the other issue before I got a chance to diver deeper on this. I'll reply back as soon as I get a chance to review this further.
Hey this issue is resolved it was related to configuration . Just added this to aws config .
Notifications: { Push: { AWSPinpoint: { appId: '<app-id>', region: '<region>' } } }
@aalindQuantel, great to hear you were able to unblock yourself! Feel free to reply back and let us know if you experience any further issues.
Getting this error even after added notifications configurations,
TypeError: _$$_REQUIRE(dependencyMap[8], "aws-amplify").Notifications.Push.onNotificationReceivedInBackground is not a function. (In '$$_REQUIRE(dependencyMap[8], "aws-amplify").Notifications.Push.onNotificationReceivedInBackground(backgroundNotificationReceivedHandler)', '$$_REQUIRE(_dependencyMap[8], "aws-amplify").Notifications.Push.onNotificationReceivedInBackground' is undefined)
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Push Notifications
Amplify Categories
notifications
Environment information
Describe the bug
I have migrated from my previous push notification library to the latest one, specifically from "aws-amplify": "^4.3.32" to "aws-amplify": "^5.2.1" and from "@aws-amplify/pushnotification": "^4.3.29" to "@aws-amplify/rtn-push-notification": "^1.1.1". I followed the instructions provided in the documentation "https://docs.amplify.aws/lib/push-notifications/migrate-from-previous-version/q/platform/react-native/". Overall, the migration process went smoothly, especially regarding authentication. However, I'm encountering an issue when using certain functions related to notifications, such as Notifications.Push.onNotificationReceivedInBackground or Notifications.Push.enable(). These functions seem to be unrecognized. I've attempted to resolve the problem by removing the node modules and package.lock files, and then reinstalling everything, but unfortunately, there has been no improvement.
Expected behavior
ideally functions like Notifications.Push.getPermissionStatus() and other should work in order to get pushnotifications
Reproduction steps
install "aws-amplify": "^4.3.32" and "@aws-amplify/pushnotification": "^4.3.29" try upgrading to "aws-amplify": "^5.2.1" and "@aws-amplify/rtn-push-notification" follow migration steps given in https://docs.amplify.aws/lib/push-notifications/migrate-from-previous-version/q/platform/react-native/
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
android emulator
Mobile Operating System
android 13
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response