I am trying to support both iOS and Android platforms through the Azure Notification Hub.
The iOS platform expects the payload in the form:
{"aps":{"alert":"Notification Hub test notification"}}
while the Android platform expects the payload in the form:
{"data":{"message":"Notification Hub test notification"}}
I am aware that the payload can be modified to include more information but the example is sufficient for the question.
Given that I send a notification to a destination based on a Tag and I do not keep a record of which platform each push notification registration uses is the only alternative to send the notification twice, once for apple native and the second for gcm native?
hubClient.SendAppleNativeNotificationAsync(payload, tag); hubClient.SendGcmNativeNotificationAsync(payload, tag);
Or, is there a way to send a notification to Azure Notification Hub with multiple payloads and then the notification hub will use the payload appropriate for the destination device?