Back to All



I'm trying to use oneSignalPushOpened but it doesn't work

I've followed the instructions of this ticket and the documentation using the bridge without the NPM package and I can't see the data sent, I've tried again but implementing median_library_ready() and the same. After trying everything I decided to install the NPM package, I'll leave my code here but it doesn't work. The last time that I rebuilt the app was 3 weeks ago.

useEffect(() => {  
    Median.onReady(() => {  
      Median.oneSignalPushOpened.addListener(data => {  
        if ("title" in data) {  
  }, [isNativeApp]);

It's hard to find how to implement this because I couldn't find an example in the documentation but finally, I think I'm implementing it correctly. As you can see my code is quite simple and isNativeApp returns true, isMedianReady returns true, but Median.oneSignalPushOpened.addListener() is false so it looks like the addListener is not working.

I hope you can help me with this.