OneSignal/OneSignal-Flutter-SDK

[question]: both addForegroundWillDisplayListener and addClickListener not triggered with hms (huawei).

Dicksenz opened this issue · 2 comments

How can we help?

Any fix for that ?

Code of Conduct

  • I agree to follow this project's Code of Conduct

Hello @Dicksenz thank you for your patience! Can you share a bit more about how and where you've added these methods? Does anything interesting pop up in the logs?

We'll work on trying to reproduce this!

Been having similar behavior, not only on cold start.

My app uses some native code for some other SDK. The other SDK had GeneratedPluginRegistrant.register(with: "xxx"), and it was placed AFTER GeneratedPluginRegistrant.register(with: self).

The GeneratedPluginRegistrant.register(with: self) has to be at the very end, for both Android and iOS.

example for swift:

        GeneratedPluginRegistrant.register(with: xxx)
        
        GeneratedPluginRegistrant.register(with: self) // this has to be at the very end

        return super.application(application, didFinishLaunchingWithOptions: launchOptions)
    }

Tested with latest 5.2.2 and working fine.. all handlers as expected.

Hope this helps someone.