Describe the bug
We already have GCM/FCM setup up and we are able to send notifications to both iOS and Android devices.
More specifically data-only notifications where we add the parameters ( priority, content_available, collapse_key )
Especially the content_available parameter is crucial when the phone is an iOS device and in order to receive the data-only notifications when the app is in the background. But behaviour seems to be different between https://fcm.googleapis.com/fcm/send call and Portal -> Azure Notification Hub -> Test Send ( or SendFcmNativeNotificationAsync )
Working Case
Everything works as expected when I use the https://fcm.googleapis.com/fcm/send call.
So we have the following message for example:
But when we use the following message in the Portal -> Azure Notification Hub -> Test Send
Platforms "Android" ( which uses the same Google GCM API Key )
Remove the “to” entry as I am using the "Send To Tag" expression
Azure Notifications hub approves the message and confirms that message was successfully sent.
But then nothing arrives on the iOS smartphone, it seems as if the content_available parameter is not taken into account.
If I add a valid “notification” field (which makes it a NON- data-only notifications ) then it arrives.
Describe the bug We already have GCM/FCM setup up and we are able to send notifications to both iOS and Android devices. More specifically data-only notifications where we add the parameters ( priority, content_available, collapse_key )
Especially the content_available parameter is crucial when the phone is an iOS device and in order to receive the data-only notifications when the app is in the background. But behaviour seems to be different between https://fcm.googleapis.com/fcm/send call and Portal -> Azure Notification Hub -> Test Send ( or SendFcmNativeNotificationAsync )
Working Case Everything works as expected when I use the https://fcm.googleapis.com/fcm/send call. So we have the following message for example:
Issue To Reproduce
But when we use the following message in the Portal -> Azure Notification Hub -> Test Send
Azure Notifications hub approves the message and confirms that message was successfully sent. But then nothing arrives on the iOS smartphone, it seems as if the content_available parameter is not taken into account. If I add a valid “notification” field (which makes it a NON- data-only notifications ) then it arrives.
Code Snippet I had the same issue when using SendFcmNativeNotificationAsync with similar payloads.
Expected behavior Both environments should have the same behavior