Make web push notifications to show for longer - reactjs

We integrated web push notifications in our React App with firebase, it is working fine both in foreground and in background. When the app is in foreground we attached a event listener (onMessage) that will handle the event and will create a push notification with the Notification Object. It is also working fine.
My question is, is there any way to increase the amount of time the notification (foreground notification) will be shown to the user? currently it is visible for 5 to 6 seconds (in Brave, Linux Mint).
Thanks in advance

No you cannot increase the time your notification is shown.

Related

React Native & Firebase Cloud Messaging: How to avoid duplicated push notification?

I have one website(React) and mobile app (React Native) which are both connected with the same Firebase Projects.
I have a button inside my Website; every time I click the button, my application receives a push notification from firebase (Firebase Cloud Messaging).
However, in case of slow internet connection or browser gets refreshed, my user is able to send a duplicated push notification.
How do I avoid this duplicated push notifications situation? In other word, I want to replace the old push notification every time I get a new push notification.
You can clear all notification before showing new notification. Version 6 do not handle provide functionality to remove notification. But you can use version 5. It has cancelAllNotifications method. You can also use react-native-push-notification.

Understanding Local Notification in Codename one

I implemented a local notification test per this example https://www.codenameone.com/blog/local-notifications.html
I have the following two questions:
1) can I test local notifications from CN1 simulator. In the link above, I see a local notification test screenshot using the iPhone 6 simulator. Is there a way to force the app to run in background form the simulator in CN1?
2) If a local notification is sent when the app is running in foreground, I understand that the notification will not fire. Is the message lost in this case or is it queued somewhere?
Currently you can only test this on the device, it will work in the native simulator for iOS as you saw in the screeshot. You can run on the native iOS simulator using a Mac and include source.
The message would be lost if you fire in the foreground on iOS as it's the assumption that this is something you can notify within your app more effectively. You can determine if your app is in the foreground using the Display.isMinimized() method. In the foreground case you can use a tool like ToastBar to show a notification.

send image in push notification

I've only sent texts in push notification till now. Can I send images as well in cn1? And how can I open a specific screen through clicking push notification? Up to now, it only opens the home screen of the app.
There is an RFE for supporting rich push notifications here. It's currently pretty bare of use cases so I suggest adding those as it's scheduled for the next update.

Push Notification Ionic. How to handle data of multiple notification?

I have implemented a push notification on my ionic app using cordova push notification.
The whole Notification part is done. I receive notifications properly, but the problem is when I receive multiple notifications for eg.
If I have 3 notifications in ascending order
message1
message2
message3
And if I clicked on 1st notification which is 'message1'. Further app gets open and it shows me 'message3'.
No matter whichever notification I'll click, it always shows a last notification which was received.
I'm not getting how to catch a data of notification on which I had clicked
(Is it possible by local notification plugin? which has onclick function.)
PLEASE HELP

Is there any method like Iphone's application didfinishlaunchingwithoptions in Windows Phone 7?

I am implementing push notification WP7 it coming successfully in my application.I am executing specific code after receiving the notification.But the problem is that when the application is in background or closed and the push notification arrives at that time only the application's first page is coming.I want to execute the code when the application starts by notification.
In Iphone there is a method applicationdidfinishlaunchingwithoptions, in this method we can check whether the application is started by push notification or not.
Is there any method like that in WP7?
For a push notification, you set a uri for navigation. Add a url parameter to this, and handle it in the OnNavigatedTo method.

Resources