Thank you for the detailed explanation. The symptoms you mentioned “0 of 0 sent” in the Azure portal and Active device count = 0 suggest that the hub is not detecting any Android registrations using FCM HTTP v1. As a result, when you attempt a broadcast or test send, there are no devices to target, even if the registration calls appear to be successful.
Here’s why this occurs:
- The device might be registered, but not as FCM v1, leading to a mismatch between legacy and v1.
- Alternatively, the FCM token may be linked to a different Firebase project than the one set up in the Notification Hub. In either scenario, the hub cannot target the device. (See background documentation: FCM v1 migration and telemetry)
Reference:
https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-gcm-to-fcm
Please complete the following steps to fix the issue:
- Confirm FCM v1 credentials in the hub (not legacy server key)
- Go to Azure Portal → Notification Hub → Settings → Google (FCM v1)
- Upload the Service Account JSON details (Private Key, Client Email, Project ID)
- Delete any old GCM/legacy Server Key entries
- Save your changes and allow a few minutes for them to take effect
Reference:
- Re-register the Android device as FCM v1
- Uninstall and reinstall the app, or clear the app data, to trigger onNewToken()
- Make sure your registration or installation sets Platform = FcmV1 and uses the latest FCM token
- Check the logs or list the installations to verify that Platform = FcmV1 or an fcmV1RegistrationId appears
reference: https://learn.microsoft.com/en-us/azure/notification-hubs/android-sdk
Initiate a native FCM v1 test directly from the backend (not through the portal) Please utilize the FCM v1 JSON format, ensuring you include the appropriate message wrapper.
var payload = @"{
""message"": {
""notification"": { ""title"": ""Test"", ""body"": ""Hello from NH"" },
""android"": { ""priority"": ""high"" }
}
}";
await hub.SendFcmNativeNotificationAsync(payload);
If the send continues to show zero outcomes, it indicates that the hub is not detecting Android v1 registrations. For those on the Standard tier, please review telemetry data (FcmV1OutcomeCounts) to verify if delivery attempts have been made.
If the issue continues, please provide the following:
- A log line that shows the registration call with Platform = FcmV1
- The send outcome, including outcome.Results if available
- Confirmation that the FCM token is from the same Firebase project configured in the hub (refresh google-services.json and rebuild if needed)
Kindly let us know if the above helps or you need further assistance on this issue.