CrossGeeks / AzurePushNotificationPlugin

Azure Push Notification Plugin for Xamarin iOS and Android
MIT License
67 stars 34 forks source link

Hide Notifications if app is in foreground (android and ios) #40

Closed Daniel0b1b closed 4 years ago

Daniel0b1b commented 4 years ago

How can I achieve notifications are not displayed if app is in the foreground on android/ios? Only the event OnNotificationReceived or another event should be triggered.

Daniel0b1b commented 4 years ago

Just add the silent key to the data payload .

    "data":
    {    
        "title": "Testtitel",
        "body" : "Notification Hub test notification2",
        "silent" : "true"
    }