Handle azure notification hub push notifications in xamarin

Qudevis 1 Reputation point
2022-04-29T15:25:08.157+00:00

Hello, I have a question. Basically I followed a tutorial, and managed to set up a working push notification system with firebase and azure notification hub, the issue is that there is no way to handle on notification click event, if I receive the notification while the app is opened and running it triggers the OnPushNotificationReceived function (that is brought in by azure notification hubs android nuget) and I can execute the code I want, navigate etc. that is not an issue, but if the app is in background or the screen is locked the notification doesn't trigger that function, and even when clicking on it it doesn't trigger that function, so I can't change the function where the app navigates, I would need some advice, how to change onclick event with the azure.notificationhubs.android nuget.

Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
265 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Qudevis 1 Reputation point
    2022-04-29T16:12:20.383+00:00

    Well I seem to have figured it out on my own. Basically if you send Notification {title....body...}, it auto processes it for you otherwise it is sent to on notification received. Just remove the title and body attributes and you should be golden. But an answer how to change onclick action still would be necessary since, it would make my life easier.

    0 comments No comments