NativeScript / plugins

@nativescript plugins to help with your developments.
https://docs.nativescript.org/plugins/index.html
Apache License 2.0
187 stars 104 forks source link

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

Open tobiAdBr opened 1 year ago

tobiAdBr commented 1 year ago

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?

insytes commented 2 weeks ago

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?