Azure / azure-notificationhubs-dotnet

.NET SDK for Azure Notification Hubs
MIT License
70 stars 119 forks source link

[BUG] Provide new nuget packages, and docs with examples that will show how to use Azure Notification Hubs with MAUI #315

Closed DeveloperLookBook closed 3 days ago

DeveloperLookBook commented 2 months ago

Describe the bug For now, your docs contain instructions for Xamarin.Form, Xamarin.Android and Xamarin.iOS, so we need new docs and new examples and probably new nuget packages that will support MAUI.

developer9969 commented 2 months ago

Interested in this too is there any real chance of getting them. I would honestly be very very surprised if we get a reply from MS

lomagdal2 commented 3 days ago

We don't support MAUI at this time.

developer9969 commented 2 days ago

@lomagdal2 what does "we dont support Maui at this time" means ?? what stops using a connectionstring?

jfversluis commented 1 day ago

Just to clarify here, you can absolutely use Azure Notification Hubs (ANH) with .NET MAUI. What is meant here is that this library does not anything specific to support .NET MAUI at this time. We are working on content that shows how to use ANH together with .NET MAUI and there are also great community libraries out there like Shiny, that use AHN to implement push notifications.

DeveloperLookBook commented 1 day ago

@jfversluis Hello, Gerald! I apologize, but the last time I tried to use Azure Notification Hubs (ANH) with .NET MAUI, it took me two weeks to complete the integration/migration. I only succeeded because someone provided an example. Every developer I know would say that using ANH with MAUI without clear instructions is quite challenging. Additionally, we did not want to use third-party packages like Shine. This is why we are requesting updated, clear, step-by-step instructions.

jfversluis commented 1 day ago

No need to apologize!

I totally understand that doing this for the first time might be a chore. For the record: I work on the .NET MAUI team, not the team that maintains this library. I just wanted to clarify that it is possible to use this with MAUI. From the MAUI side of things we will be providing a sample with content and instructions soon that we can hopefully make this easier for people.

TedMobile commented 10 hours ago

@jfversluis Thanks for the clarification, it's a relief , we have successfully implemented push notification for iOS and android in Maui using Azure notification hub and works really well. It was a utter nightmare as many of the docs out there are outdated and permission in android are changing all the time. We have all working in our internal library and going live soon , but clients ask what provider do you use? Your response goes a long way to reassure them, as a client found exactly this thread and send us an email for clarification.Thanks again.

baaaaif commented 10 hours ago

@TedMobile Have you managed to implement a NotificationServiceExtension? And do push notifications arrive when the app is closed? Unfortunately, I haven't managed to get the DidReceiveNotificationRequest call in the extension yet

So I can hardly wait for better documentation

TedMobile commented 10 hours ago

@baaaaif We have not implemented NotificationServiceExtensions because we wanted to get the basic ones working.. It was next in the agenda if required by any client to further customise their notifications.

our notifications work in 3 scenarios - app closed - app open - app in the background.. , We also created a .net 8 minimal api to intereact with ANH.. as our clients will send notifications via their desktop backend system.

Documentation is very very poor as implementation in both android and iOS goes, all the samples are very old and no longer working.. We wanted to use some open libraries but we found that you are pretty much on your own there too, so we decided to give a go to ANH..

I have to admit that it was full of trial and errors..

I do think that is such an essential part of a mobile ecosystem for any meanigful app and I do hope Microsoft produces a reference implementation and document. In other framework is just part of it..

Our implementation is closed source unfortunately, and all the sample out there are pretty rubbish! None and I say none including open libraries show the full story... including a full example of a proper payload, which is critical...

baaaaif commented 8 hours ago

That probably means you don't have to change the notification content and therefore don't set mutable-content to 1, right?

That's why push works with a closed app without NotificationServiceExtension

@jfversluis it would be cool if you would also consider the mutable-content and NotificationServiceExtension case. That's where the challenge lies :)

TedMobile commented 8 hours ago

That probably means you don't have to change the notification content and therefore don't set mutable-content to 1, right?

That's why push works with a closed app without NotificationServiceExtension

Yes. correct!!! - we dont have this need yet , but I guess as soon as our clients become more demanding this is something we need to look at.. are you saying when NotificationServiceExtension is implemented , notifications do not appear? This is HUGE problem because 99% people will have their app closed

The all notification saga has been a BIG problem so far , I do hope this works for us , because even the paid ones some dont work very well in debug if you are using a windows operating system and hot restart is another issue