plugins icon indicating copy to clipboard operation
plugins copied to clipboard

[@nativescript/local-notifications] Is there a way to handle Notifications if the app is in foreground?

Open tobiAdBr opened this issue 2 years ago • 1 comments

My problem is that I want to handle notifications that are shown differently than notifications that are not shown. Basically if the application is in the foreground I want to display an in-app page.

IIRC there is only one handler for click events on the notification.

Can anybody help me with this problem?

tobiAdBr avatar Feb 15 '23 09:02 tobiAdBr

Could you explain in more detail what you'd like to achieve?

The option forceShowWhenInForeground exists to display notifications when the app is in the foreground and LocalNotifications.addOnMessageReceivedCallback will be invoked when the notification is pressed... so you can display an "in-app" page?

insytes avatar Jun 25 '24 17:06 insytes