1
votes

I am using tags to send push notification to iOS from Azure Notification hub.Some of the registered devices subscribed to this tag are getting push notification while others are not.Is it possible to see the list of devices which have received push notifications and which haven't.I would require such detail for debugging.As far as research done I have not found any such option.Please let me know if this is possible.

1

1 Answers

1
votes

So this is tricky, there is not really a way to know if your notification are correctly received by itself (even if you are not using Azure). You must remember that Notifications really just have a "best effort" policy. And that policy is provided by Apple, Google and WNS; not really by Azure.

Now, there are a couple of things you can try to make you percentage of receival higher:

  1. Make sure your Notification Hub is set to Standard. If you are actually doing production developments you have to remember that there are some restrictions for instance, in basic you can only have 500 active devices per namespaces and there is no SLA for free tier. Also, standard provides you access to "Per message Telemetry", which I highly recommend you implement to see how you are doing, you can combine it with the analytics provided by the Azure portal dashboard .

  2. Triple test that your client app code implements Azure notification Hub correctly. When I first started working with this service, my biggest mistake was that I was constantly adding deviceTokens to my Azure Push notification Service. You can definitely figure this out by using the Service Bus Explorer in Windows to see the amount of registrations you are getting on each tag. Also, using Service Bus Explorer you can definitely know if your devices are getting registered with the actual tag you want. NOTE: It is extremely easy to remove the Notification Hubs with this tool while removing devices, so make sure you have all your keys saved so you can re create them in case of an error

  3. Make your own telemetry service. Let's suppose you are actually receiving info in your mobile devices. What you could do is a simple sqlite table or any kind of persistent storage in your phone where you can have a queue with all the information about the notifications. Depending on the OS of the phone you can detect certain triggers, for instance you can save the timestamp when you received the notification (DidReceiveRemoteNotifications with UIApplicationStateBackground) and the time when it was opened. Then this queue can be sent to a SQL Azure and you could use PowerBi to display times and graphics. You just need to remember that if your phone is not even on the tag list, you won't even get the notification.

In any case, this still a best effort type of scenario and if you make any breakthroughs please let us know.