As to your questions.
1. Successfully creating a notification returns the
property of the notification object. Surely, you need to apply some exception handling in case an exception is thrown during the execution of this method.
2. Note that when a notification is received - the user may dismiss it and delete it from the notification tray/center. On iOS there is another specific behavior explained in this forum thread.
In order to accomplish this task one meaningful approach would be the sample workflow below:
- A notification is received on the user's device.
- The notification is opened through the alert/banner in iOS or from the notification tray in Android (when the app is in the background) - this will call the onPushReceived handler in the app which will receive information about the received notification. This handler will also be called when a notification is received and the app is in the foreground.
- A logic in the event handler notifies a backend service that has some logic that handles the feedback from the client app.
Please, let me know if you have further questions.