Capacitor push notifications for Ios are empty when clicking on the notification banner - push-notification

My app uses push notifications (Ionic Capacitor) and when I enter the app I use getDeliveredNotifications() to get all the notifications to display. This works great if the user clicks on our App icon but when the user clicks the notification banner I get an empty array back.
Its like the notifications get wiped before getDeliveredNotifications gets called. Any thoughts on what I might try to fix? I checked this on Android and it works as expected...

Related

Firebase push notification message does not upload badge app icon

When my database record is updated on the server it sends a push notification to the Android app user through FCM. The notification is sent but the badge count on the device is not updated. How do I set the notification to change the badge app icon?
In Android this doesn't happen automatically like it does with the iOS implementation. You'll have to handle this yourself by overriding the onMessageReceived method - see https://firebase.google.com/docs/cloud-messaging/android/receive. The badge count can then be updated using something like https://github.com/leolin310148/ShortcutBadger to make things easier.

iOS Push - display message if app is active

I'm implementing Push in a Xamarin Forms PCL project, and I'm having an issue with iOS.
If the user is actively using the app I want to display an alert to let them know they have received a notification and let them choose to View it (which changes the current page) or cancel.
If the app is not active, either in the background or not running, I want to go directly from the tap on the iOS notification to the notification page - no alert. I have this working if the app is not running.
If the app is running, either in the background or active, the RecievedRemoteNotifications function is called which will display the alert. I don't see a way in RecievedRemoteNotification to determine if the app was already active or if the user tapped the system-generated notification.
Check out the ApplicationState property from UIApplication.SharedApplication.
More information about the possible values here. There is a Background state.

Tapping on the app icon does not display the notification in the app

I am using the Event source-based notifications in hybrid applications sample from https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/notifications/push-notifications-hybrid-applications/event-source-based-notifications
When I receive a push notification and I tap on the app icon instead of tapping the notification in the notification bar, the notification isn't pushed and still appearing on the notification bar. Only if I tap on the notification bar, even if the app is open, the notification is pushed and is deleted from the notification bar.
There are no problems if the app is open when I receive the notification.
How I can force the notification to be pushed when I tap on the app icon rather than tapping the notification in the notification bar?
MobileFirst 7.0.0
Android Environment
I have indeed reproduced this. It appears to be a regression.
After a push is received and you then tap either the incoming notification in the notifications bar or the app icon
the app is supposed to launch
you are then prompted to login
push support etc is checked for, and finally
if there's a notification in the queue then it is supposed to be displayed (the pushNotificationReceived function is supposed to be called). This is not happening when tapping on the app icon
If you are an IBM customer or business partner I suggest for you to open a PMR (support ticket). This is going to be investigated by the development team...

How to display a notification in worklight when returning to the foreground?

I am using push notification in worklight 6.2 in one of my apps.
I have a issue regarding receiving of notification. i receive notification when i am in the application .
When i close my app or made my app go background, i receive notification in the status bar and when i click on that,its taking me to the app ask for the authentication which is provided in the app and then goes to the inbox where all the messages are listed the new message is displayed .
But when i receive the notification when my apps is in background and see the notification in status bar and without clicking that notification if i opened the application and see the inbox page ,the message is not displayed because the function which will be executed when receiving notification is not called.
I need to give solution to avoid this. Is there any way or option to display the notification which is received when the app is in background and when the app is opened without opening the notification in status bar.
Thanks in advance
Perhaps you could use a the Cordova resume event, from which you will call the pushNotificationReceived() function as the callback function.
document.addEventListener("resume", pushNotificationReceived, false);
The basic premise is that if a notification was received while you were in the background, then once returning to the foreground the above should executed and the notification will be displayed.
Again, this is just the basic premise and you'll probably need to modify the pushNotificationReceived() implementation to account for what happens when you get back to the foreground but there are no notification (you could implement some logic to check that...) and various other scenarios, as you encounter them.

iOS5 Push notifications, Are there any alternatives to the Notification Center?

I have 2 related questions regarding the new push notification in iOS5:
If my application is not running in the background - Can the notification arrive to my application silently?
Can I revert back to the old modal popup UI for push notification? Can I do it programmatically only for my application notification while leaving all the rest using the notification center disappearing notification?
You can send a silent message by not providing the sound property with the push message.
You cannot revert back to the old modal popup.

Resources