Closed zarepp closed 3 years ago
Hello @rgomezp, I also facing the same issue as stated by @zarepp here. Seek your feedback and assistance regarding this issue. Thanks
Hi @rgomezp. We are still hoping to get feedback from your end. Thanks in advance.
Hi, I am using version 4.2.0 and it seems that it has not been fixed yet.
OneSignal.setNotificationOpenedHandler() for HMS returns:
{ "rawPayload": "{\"custom\":\"{\\"i\\":\\"472e45f2-8bd2-4be3-b39e-049c93dd7ed7\\"}\",\"_push_msgid\":\"-1643710186\",\"_hw_from\":\"736430079245858662\",\"_push_data_version\":\"1\",\"_push_notifyid\":538084639,\"_push_cmd_type\":\"cosa\"}", "lockScreenVisibility": 1, "androidNotificationId": 0, "templateId": "", "priority": 0, "groupedNotifications": null, "templateName": "", "notificationId": "472e45f2-8bd2-4be3-b39e-049c93dd7ed7" }
Hi
Howdy, We were seeing some issues with the foreground handler but they got fixed in 4.1.1.
Please upgrade to the latest version.
Enjoy!
@rgomezp The issue still has not been fixed yet with v4.2.0. Body & title still missing in rawPayload. Please advice us with any suggestion to cater this issue.
Howdy,
Thanks for your patience everyone.
So unfortunately it looks like Huawei doesn't provide what was displayed on the notification such as the title
and body
text. However, as a workaround, you can add anything you choose as additional data and it will be provided in the payload.
Hope the workaround helps.
Enjoy!
Description: I'm currently integrating OneSignal react-native plugin in both HMS and GMS environment, it seems like does not work in HMS environment in Huawei device without GMS. But it works in normal Android GMS device.
I able to get getDeviceState() returned values, but setNotificationWillShowInForegroundHandler() I can't get any values after test push messages from OneSignal server as well as using postman API.
Environment react-native-onesignal": "^4.0.6" gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.1, 0.99.99] com.huawei.agconnect:agcp:1.2.1.301 com.huawei.hms:push:4.0.3.300
Steps to Reproduce Issue:
Android GMS
Huawei HMS