You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
When I receive a push notification on iOS while the app is in the foreground, the on("notification") function should be triggered.
When the app is in the foreground, the push notification is received and displayed as a normal notification in the notification centre and does not trigger the on("notification") function.
When I select the notification however, it does trigger the on("notification") function with the push notification payload.
The behaviour works as expected on Android.
When I run my app using cli-6.5.0 on the plugin version 1.11.1 then it works as expected, but not when using cli-7.5.0 with plugin version 1.11.1 or 2.1.2.
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
cli-7.1.0 (iOS 4.5.4 / Android 6.3.0)
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Testing on iPhone 6s with iOS 11.1
Plugin version
plugin versions tested 1.11.1 & 2.1.2 with the same issue.
With some more tests, I actually notice that when the app is open in the foreground, and a push notification is received and I select the message as it peaks from the top of the screen, the data being passed to the on("notification") function even indicates "foreground":true but on("notification") is not fired until I select the message.
@rudiminty you shouldn't see the notification in the shade when the app is in the foreground. As @umeshiyer asked are you using the local notification plugin?
@umeshiyer , no not using local notification plugin.
I have however by means of elimination noticed that the plugin cordova-plugin-mauron85-background-geolocation is most probably the cause with this specific issue perhaps contributing: mauron85/react-native-background-geolocation#268 (comment)
When I receive a push notification on iOS while the app is in the foreground, the on("notification") function should be triggered.
When the app is in the foreground, the push notification is received and displayed as a normal notification in the notification centre and does not trigger the on("notification") function.
When I select the notification however, it does trigger the on("notification") function with the push notification payload.
The behaviour works as expected on Android.
When I run my app using cli-6.5.0 on the plugin version 1.11.1 then it works as expected, but not when using cli-7.5.0 with plugin version 1.11.1 or 2.1.2.
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
cli-7.1.0 (iOS 4.5.4 / Android 6.3.0)
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Testing on iPhone 6s with iOS 11.1
Plugin version
Sample Code that illustrates the problem
The text was updated successfully, but these errors were encountered: