Closed AndreaMontanari89 closed 2 years ago
@HelpFamily-2020 Thanks for reporting. The HandleNotificationReceived currently only fires for "data" type payloads.
OneSignal always sends push payloads as "data" for FCM message so this can fire. However for Huawei devices we default to a "message" payload as "data" payloads don't work when the app is closed.
You can set the huawei_msg_type
to "data" if you need the HandleNotificationReceived
to fire, however keep in mind that the notification will not show when the app is closed.
https://documentation.onesignal.com/reference/create-notification#attachments
This option is also available on the OneSignal dashboard.
Closing due to inactivity.
Description:
I am trying to integrate onesignal into the application that I am developing with Xamarin SDK. With android and ios devices everything works fine.
With Hauwei devices I have the problem that the "HandleNotificationReceived" callback is not called but instead the "HandleNotificationOpened" callback is. The notifications arrive anyway and therefore it is suggested that Huawei push kit is configured correctly.
I also tried to extend the "Com.OneSignal.Android.NotificationExtenderService" class but the scenario is the same: with android it is called and with Huawei it is not.
The installed nuGet packages are: Com.OneSignal 3.10.2 and nventive.Com.OneSignal 3.2.13 I am testing the app on a Huawei p40PRO EMUI 10.1.0 Andorid 10.
The power saving app permissions settings should also be fine.
What can it be? Thanks in advance