Hi Ashwitha Gudala
Welcome to the Microsoft Q&A Platform!
The issue likely lies in the integration between your Ionic app, Firebase Cloud Messaging (FCM), and Azure Notification Hubs. Even though the app generates a device token and shows successful registration, the device isn't appearing in Azure Notification Hubs.
Verify FCM Key and Sender ID in Azure.
In Azure Portal, navigate to Notification Hub > Push Notification Services.
Confirm correct Firebase Server Key and Sender ID from your Firebase project.
Confirm that your app retrieves a valid FCM device token.
PushNotifications.addListener('registration', (token) => {
console.log('Device Token:', token.value);
});
Verify the backend sends the device token to Azure Notification Hubs using the correct payload.
{
"Platform": "gcm",
"Handle": "<DEVICE_TOKEN>",
"Tags": ["user:<USER_ID>"]
}
Check logs in Azure Monitor for registration errors.
Manually test device registration using Postman.
API POST https://<namespace>.servicebus.windows.net/<hub>/registrations?api-version=2015-01
Headers: Authorization: <SAS Token>
Content-Type: application/json
{
"Platform": "gcm",
"Handle": "<DEVICE_TOKEN>"
}
Check app permission in AndroidManifest.xml,
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
Verify the Firebase Server Key is valid.
Confirm FCM token validity.
Ensure the backend correctly forwards tokens to Azure.
Use the Test Send feature in Azure Notification Hub to send a notification.
https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-push-notification-overview
https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-android-push-notification-google-fcm-get-started
https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-push-notification-fixer
If the answer is helpful, please click "Accept Answer" and kindly upvote it.