New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Azure Notification Hub on MAUI #298
Comments
I'm having the same issue, how would one use it to register on the hub? Where are the examples? |
Same problem here.. |
Any update on this? |
Same issue - I see they have released 4.2.0-beta1 .... will this mean maui 8 is supported? |
Why is it that is so difficult to get any kind of official response? Anyone on the Azure notificationHubs-dotnet team ? thanks |
Is there are any updates or solutions? how to implement support of Notification Hub on MAUI? |
We basically cant wait any longer for a response - does anyone know of a different notification framework that works for android and IOS that is being supported on maui? |
@michaelonz that is big issue at the moment. there is nothing long term post june that will work on both iOS and android. and for people on this forum that moderate it and not to reply is just awful . I guess is to try onesignal (free) but does not work with hotrestart if you are using a pc.. or any paid alternative and would be nice to know if someone has implemented anything that works |
Anyone from Azure notificationHubs-dotnet team respond on the above issue, its been long time that we are waiting for MAUI supported package of IOS Azure Push notification |
I solved iOS push by using Microsoft.Azure.NotificationHubs var hub = NotificationHubClient.CreateClientFromConnectionString(this.connectionString, this.notificationHubName); await hub.CreateOrUpdateInstallationAsync(installation); deviceToken is obtained from RegisteredForRemoteNotifications |
Please, update your docs and examples and show how to use Azure Notification Hub with MAUI. |
@RobertHedgate - What nuget packages did you have installed to make this work - I cant find the NotificationHubClient from the IOS platform code. |
@michaelonz https://www.nuget.org/packages/Microsoft.Azure.NotificationHubs works for both android and iOS. |
@RobertHedgate this package works for .NET 6, but not with the .NET8 |
@a-martsineuski My iOS app is on .net8. Doesn´t the .net6 flag mean .net6 or higher? |
@RobertHedgate let's clarify: your app is net8.0-ios\net8.0-android? Yes, that means .NET6 or higher, but not .NETX-android.NETX-ios. It not possible to install it in the MAUI project |
@a-martsineuski no it is MAUI app with platforms and all. |
@RobertHedgate could you show a demo app, how did you install it? |
@a-martsineuski I created a quick repo of my solution. It is not complete but contains where one gets the tokens and calls the azure hub. Can be found here https://github.com/RobertHedgate/MauiAppPush |
@RobertHedgate
|
@DeveloperLookBook I have added some nuget to android so it should build now but you still need to add google-sevice,json and all certificate to your project to make it work. You should more look at the project and use its registration to azure in your own projects. |
Hi @RobertHedgate - can you please specify what certificates we need to add and where we need to put them in the folder structure along with if any properties are needed on the files (eg embedded resource etc etc) - so good to finally see an example working with .net8 |
@michaelonz Added this below to the readme of the project. Hope it helps. For iOS you don´t need anything else in your app except selecting the correct certificate when you build. Android you need the google-service.json file you download from you firebase console and add it directly under Android folder. Here are a tutorial on iOS. https://learn.microsoft.com/en-us/azure/notification-hubs/ios-sdk-get-started Setting up Android FCM V1 https://learn.microsoft.com/en-us/azure/notification-hubs/firebase-migration-rest If GoogleServieJson doesn´t show up as build action dotnet/maui#14486 |
@RobertHedgate - i downloaded your sample (thank you) and i downloaded my google-services.json and set the buildaction to googleservices.json. When I run it on android (havent tried apple yet) I get the following error: [FirebaseApp] Default FirebaseApp failed to initialize because no default options were found. This usually means that com.google.gms:google-services was not applied to your gradle project. Any ideas? NOTE: I have already tried re downloading the google-services.json file also. |
Hi @RobertHedgate - No need for you to look into my issue above .... I worked it out. Hope this helps others also. I still havent got the end to end message working but this resolved the following error: [FirebaseApp] Default FirebaseApp failed to initialize because no default options were found. This usually means that com.google.gms:google-services was not applied to your gradle project. |
Question
Is there a way to implement notification hub registration on MAUI applications (Android and iOS)?
I've tried implementing notification hub registration using NotificationHubClient on IOS( but I don't think a client application should use this implementation to register).
Implementation:
What is the proper way to implement push notifications on MAUI for Android and iOS using the Azure Notification hubs?
The text was updated successfully, but these errors were encountered: