How to send silent notification to ioS and Android using Azure Notification Hub

487 Views Asked by At

I am trying to test silent notifications using Azure Notification Hub. I have not used it before so I wanted to know if we can do it. If yes, then what should be the payload. Currently, when I click on "Test Send" it opens a payload and I wanted to know what should be the payload if we want a silent notification where we just want to activate the app but not actually send a notification.

Current Payload as per Azure

{
    "notification":{
        "title":"Notification Hub Test Notification",
        "body":"This is a sample notification delivered by Azure Notification Hubs."
    },
    "data":{
        "property1":"value1",
        "property2":42
    }
}

What needs to be changed here in the payload

1

There are 1 best solutions below

3
MarStr On

Removing the "notification" portion of this payload will make this a silent notification.