[Firebase Mobile] Show Push Notification on Task-bar/Notification-bar even when application is opened |

Forge Component
(15)
Published on 17 Jul by David Sousa
15 votes
Published on 17 Jul by David Sousa

Greetings,

I am able to receive the notification from firebase on mobile app when  the application is closed or open in Android.

Application Closed : Notification is shown on task-bar

Application Open : I get an event in Notification Data handler 

I want to show the same notification on task-bar even when the application is open.


Note : The behavior is normal with iOS device but on Android it doesn't show the notification on task-bar when app is open.


Any Help Much Appreciated,

Thanks

Hello,

This is the plugin's expected behavior for Android. If the app is opened, the push notification won't show on system tray.

This is also the behavior for apps such as WhatsApp, if you have a conversation opened and you receive a new message it won't generate a push notification.

If you still want to achieve it, it requires changes to the plugin code.

Best regards,

David


assif_tiger wrote:

Greetings,

I am able to receive the notification from firebase on mobile app when  the application is closed or open in Android.

Application Closed : Notification is shown on task-bar

Application Open : I get an event in Notification Data handler 

I want to show the same notification on task-bar even when the application is open.


Note : The behavior is normal with iOS device but on Android it doesn't show the notification on task-bar when app is open.


Any Help Much Appreciated,

Thanks


Hi Assif, You can show your push notification messages on task-bar even when the application is open.

Please use 

SyntaxEditor Code Snippet

Interaction\Notification

 and pass your push message and display in Notification data handler using flag. It is kind of custom display.

Hope this will work for you!

Cheers...!

Meer Imtiyaz wrote:

Hi Assif, You can show your push notification messages on task-bar even when the application is open.

Please use 

SyntaxEditor Code Snippet

Interaction\Notification

 and pass your push message and display in Notification data handler using flag. It is kind of custom display.

Hope this will work for you!

Cheers...!

Hello Imtiyaz,

Thanks for the reply,

Yep it's also an option but I want the Notification to be shown on System-Tray, Perhaps Instead of this I can go with :

- Use Local Notification & Push the same in FirebaseTrigger

- or Customize the plugin, so that we can have a permanent solution




Hi David,

Unable to access NotificationData variable which is under Common/Layout block in FirebasecloudmessagingNewnotification handler. Please let me know how to access it.


Thanks

Harish

Defined handler in same block then i am able to access the notification data.


Harish Yerra wrote:

Hi David,

Unable to access NotificationData variable which is under Common/Layout block in FirebasecloudmessagingNewnotification handler. Please let me know how to access it.


Thanks

Harish