Xamarin Android - CrossGeeks - AzurePushNotificationPlugin - 如果应用程序在前台则隐藏通知(android 和 ios)

Xamarin Android - CrossGeeks - AzurePushNotificationPlugin - Hide Notifications if app is in foreground (android and ios)

我正在使用 CrossGeeks AzurePushNotificationPlugin

https://github.com/CrossGeeks/AzurePushNotificationPlugin/issues/40

如果 android/ios 上的 foreground 如何实现不显示通知?

只应触发事件 OnNotificationReceived 或其他事件。

只需将静默密钥添加到数据负载中即可。

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