Hey!
It's me again!
I've noticed some issues, either in the current behaviour and also in the way Titanium is managing the Activity's states. The event weren't triggered as expected sometimes.
Thus, I've changed a bit the implementation; Here is what's going on now:
If the app is running in foreground, both event notificationreceive and notificationopen would be triggered.
If the app is running in background and has not been destroyed by the OS, notificationreceive will be ignored. However, a click on the notification will resume the app and trigger the event notificationreceive.
If the app is not running or, is in background but has been destroyed by the OS, no event would be triggered (impossible to trigger those events). Nevertheless, clicking on the notification will start the app and the start Intent would have been enhanced with the notification data.
If this behaviour sounds good for you, then, feel free to merge ^.^
Hey! It's me again! I've noticed some issues, either in the current behaviour and also in the way Titanium is managing the Activity's states. The event weren't triggered as expected sometimes. Thus, I've changed a bit the implementation; Here is what's going on now:
notificationreceive
andnotificationopen
would be triggered.notificationreceive
will be ignored. However, a click on the notification will resume the app and trigger the eventnotificationreceive
.If this behaviour sounds good for you, then, feel free to merge ^.^