-
I'll start with what I am trying to achieve.
I have added some code into the Here's a table of the 6 different scenarios. My primary issue are the scenarios when OnRecieved is not firing.
When the notification appears on the device I see this in the the VS Output window
I can get OnReceived to fire for silent notifications on both platforms whether in the background or the foreground. However I don't want to use silent notifications as there delivery is less predictable and throttled on iOS. Also when processing the silent notifcations on iOS, with the app in the foreground my attempts to create a local notifcation as the "visual notification" never result in a notification appearing. I know that OnRecieved does not fire if the Data portion is not populated but in the case of Android I can see from the OnEntry event that the Data object is populated. In the scenarios where the the app is closed the fact that OnRecieved is not firing is not an issue as the app will update that data on startup anyway Am I wrong to expect OnReceived to fire for non silent notifications in Android when the app is backgrounded and in either state for iOS? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
For iOS, it is likely you are missing the content-available=1 in your push payload. Also note, that if you send lots of content-available=1, Apple will throttle as well even if you include an alert. For Android, if you swipe away the app, the service will die. If you stop the debugger, the service will die. |
Beta Was this translation helpful? Give feedback.
For iOS, it is likely you are missing the content-available=1 in your push payload. Also note, that if you send lots of content-available=1, Apple will throttle as well even if you include an alert.
For Android, if you swipe away the app, the service will die. If you stop the debugger, the service will die.