-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[@hmscore/react-native-hms-push] Can't access notification data, when user tap notification #271
Comments
same issue with 8.0.0 emui |
I having the same Issue with React Native and Android 11. I get the push notification, but when I press I just get an empty object "{ }" as a result. |
I tested it on two devices (non huawei Android 14, with installed HMS Core and AppGallery and Honor 9 lite(Android 9, EMUI 9.1.0)). On Honor i got notification data from onNotificationOpenedApp, but on non Huawei device i got empty object instead of data. I noticed that even token format was different. It seems like on non huawei device i received fcm token(at least i think so), but on huawei device i received correct hms token. Probably this is source of problem |
Hi, everyone! I'm also facing a similar problem. Testing on a real device - Huawei P40 lite (JNY-LX1, EMUI 12.0.0) HmsPushEvent.onNotificationOpenedApp fails when opening notification from tray |
Description
When we send notification + data via Huawei console we expect our app to trigger onNotificationOpenApp listener on notification press and we await, that in result will be passed notification data to perform some inner app logic.
Expected behavior
When we tap notification - it fires onNotificationOpenApp and pass notification data to it
Current behavior
When we tap notification - it fires onNotificationOpenApp and pass empty object "{ }" to it. Although, data messages, sended via console to HmsPushMessaging.setBackgroundMessageHandler works correctly and display all the data received.
Environment
Other
This is part of index.js file we used, we followed fully by Client Development section on site.
HmsPushMessaging.setBackgroundMessageHandler works correctly and print all passed data.
HmsPushEvent.onNotificationOpenedApp triggers, bit prints "{ }"
The text was updated successfully, but these errors were encountered: