I wish to support both iOS and Android platforms through the Azure Notification Hub.
The iOS platform expects the payload in the following form:
{"aps":{"alert":"Notification Hub test notification"}}
The Android platform expects the payload in this 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.
I send a notification to a destination based on a Tag and I do not keep a record of the 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);
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?