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.
OneSignal.Current.StartInit(OneSignalData.AppId)
.Settings(new Dictionary<string, bool>() {
{ IOSSettings.kOSSettingsKeyAutoPrompt, false },
{ IOSSettings.kOSSettingsKeyInAppLaunchURL, false }, })
.InFocusDisplaying(OSInFocusDisplayOption.Notification)
.HandleNotificationOpened((result) =>
{
on_notification_action(result);
})
.HandleNotificationReceived((notification) =>
{
on_notification_received(notification);
})
.HandleInAppMessageClicked((action) =>
{
// Example IAM click handling for IAM elements
Debug.WriteLine("HandledInAppMessageClicked: {0}", action.clickName);
})
.EndInit();
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