0

My Xamarin.Forms app is sending push notification, but for some reason it does not work consistently. E.g. when a notification is sent to an Android phone, it may come immediately, or an hour later, or not come at all. Or now I am sending a notification to two iPhones. It immediately comes to one of them (SE), and does not come to the other (iPhone 8) at all. And the notifications settings are the same. This happens when I use either LTE or WiFi. How can this be explained and even fixed?

ADDED: To send push notifications, I use Microsoft.Azure.NotificationHubs.NotificationHubClient

        NotificationHubClient hub = NotificationHubClient.CreateClientFromConnectionString(NotificationDispatcherConstants.FullAccessConnectionString, NotificationDispatcherConstants.NotificationHubName);
        Dictionary<string, string> templateParameters = new Dictionary<string, string>();

        foreach (var tag in NotificationDispatcherConstants.SubscriptionTags)
        {
            templateParameters["messageParam"] = json;
            try
            {
                await hub.SendTemplateNotificationAsync(templateParameters, tag);
David Shochet
  • 5,035
  • 11
  • 57
  • 105
  • Hi David. Can you share with us how are you implementing the Push notification system? Any library or code snippet – Juan Sturla Oct 14 '21 at 16:59
  • @JuanSturla I added it to my question. – David Shochet Oct 14 '21 at 17:05
  • There are quite a few help articles for Azure Notification Hubs [on Microsoft Docs](https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-push-notification-fixer). Push notifications require a lot of really sensitive information to set up and it can be difficult to communicate that information for answerers. – Andrew H Oct 14 '21 at 22:03

0 Answers0