Hi all,
I've been following this guide, albeit a bit outdated, to set up the backend services and register them with Azure Notification Hubs.
Google:
Azure automatically verifies the API Key when I click on Save so does that mean I have set up Firebase correctly?
For the project setup, I decided to follow this guide instead as it uses official Nuget packages to handle registration and notifications as opposed to custom code.
In my Xamarin application startup app class, I've registered Notification Hub however my emulator doesn't get registered in Azure
public partial class App: Application
{
public App()
{
// Azure Notification Hub
NotificationHub.Start("Endpoint=sb://....", "My-App-NH");
NotificationHub.AddTags(new[] { "DeveloperDevices" });
NotificationHub.NotificationMessageReceived += (sender, args) =>
{
Debug.WriteLine("Message received");
};
NotificationHub.InstallationSaved += (sender, e) =>
{
Debug.WriteLine($"Installation ID: {e.Installation.InstallationId} saved successfully");
};
NotificationHub.InstallationSaveFailed += (sender, e) =>
{
Debug.WriteLine($"Failed to save installation: {e.Exception.Message}");
};
}
}