react-native-onesignal icon indicating copy to clipboard operation
react-native-onesignal copied to clipboard

Opened event calling twice on notification open

Open hiteshagja opened this issue 8 years ago • 6 comments

In the recent version, the opened event calling twice on notification open. It was working fine in the previous releases/versions.

OneSignal.addEventListener('opened', this.onOpened);

I am checking on Android device.

hiteshagja avatar May 14 '18 22:05 hiteshagja

@hiteshagja Are you saying this issue only occurs in Android...?

Also, how do you know that the event is getting called twice? I have attempted to reproduce your issue but it only gets fired once.

Can you please provide a bit more detail on how you are reproducing this issue? What steps should we follow...?

Nightsd01 avatar May 14 '18 22:05 Nightsd01

Please provide more information. For example, does this only occur when the app is open (in the foreground), background, closed completely, etc.?

Also, please add a console.log statement in your code where you are calling OneSignal.addEventListener to make sure you are not adding the event listener twice...?

Nightsd01 avatar May 14 '18 22:05 Nightsd01

Hi @hiteshagja ,

Thanks for reporting this issue, after digging a bit deeper, this issue was caused when we introduced JS initialization in 3.2.0.

I've created a pull request (#506) to fix this problem and it should be included in an update either later today or tomorrow!

Nightsd01 avatar May 14 '18 22:05 Nightsd01

#506 has been merged - thanks for reporting this issue @hiteshagja

Nightsd01 avatar May 14 '18 22:05 Nightsd01

Thanks @Nightsd01

hiteshagja avatar May 14 '18 23:05 hiteshagja

@Nightsd01 thankx

jigaryadav avatar May 15 '18 05:05 jigaryadav