OneSignal-Flutter-SDK icon indicating copy to clipboard operation
OneSignal-Flutter-SDK copied to clipboard

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

Open Dicksenz opened this issue 10 months ago • 2 comments

How can we help?

Any fix for that ?

Code of Conduct

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

Dicksenz avatar Apr 04 '24 05:04 Dicksenz

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!

jennantilla avatar Apr 19 '24 00:04 jennantilla

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.

ihijazi avatar Aug 03 '24 14:08 ihijazi