Implement Push Notifications with Xamarin.Forms (Android) and FCM

Implement Push Notifications with Xamarin.Forms (Android) and FCM

Gerald Versluis

3 года назад

53,442 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Yannick Nfankou
Yannick Nfankou - 26.10.2023 11:49

Hello Gerald

Thank you for your interesting video.

I was able to carry out a little test thanks to your tutorial but sometimes the notification does not arrive on 10 launched we receive 5.

This leads me to ask a question: there is no mechanism in Xamarin to notify the client (device) even when the application is closed.

Like Whatsapp or Gmail when a new message arrives, you have a notification and a message counter on the application icon.

Do you have an idea of the design to put in place to create such a system?

Ответить
Stefan O
Stefan O - 02.08.2023 22:22

Thanks for that video! Helped me a lot. I set the Target Android Version to 33 and in my Emulator I don't get messages when the app is closed (I get them when it is open). On an older device it works both when the app is open or closed. Do you have any idea?

Ответить
Leo Souza
Leo Souza - 07.07.2023 01:25

Hey Gerald, how about push notification in MAUI? It would be a great video!

Ответить
Saurav Kumar
Saurav Kumar - 15.06.2023 08:31

If possible can you add a video for uwp as well?

Ответить
Lele DORIA
Lele DORIA - 18.04.2023 15:26

hello, great job, i installed the app on a my device. how do i know its token to pass to FB for sending notification?

Ответить
Monika Vangala
Monika Vangala - 05.04.2023 22:50

why does not the android app ask for notification permission? I face the same issue

Ответить
Jaison Canarys
Jaison Canarys - 04.04.2023 10:43

Hey, thanks for the video, do we have option to disable push notification from app side for pushes with some particular tags?
Thanks

Ответить
James Wilkinson
James Wilkinson - 24.02.2023 12:08

To view notifications in the foreground you can set the priority of the notification to "High" by adding the key/value "priority" and "high" to the custom data field in FCM

Ответить
Pad Deeayen
Pad Deeayen - 25.01.2023 02:17

Your videos are very useful and to the point. Thanks. Could you please remake this video to work with .Net MAUI. I've been trying to get FCM to work in MAUI for 3 days now and we are frustrated to the point of building our app with another stack. Push notifications is a common thing, why is it so hard to do in MAUI

Ответить
Dashrathsingh shekhawat
Dashrathsingh shekhawat - 05.01.2023 13:58

once I registered the device there no problem with getting Token, but, after I delete app and test again the app doesn't get the Token. I cannot receive the notification anymore.
how can I store token?

Ответить
F0YF0YT0S
F0YF0YT0S - 16.12.2022 23:11

Great tutorial! Excellent delivery! Would this work hit Maui Hybrid as well or we would face problems in that context?

Ответить
Ashish Dixit
Ashish Dixit - 16.12.2022 22:43

many thanks Mr. Gerald , Very easy to understand. I have one question , How to customized UI Notification(e.g. :- Title will be on Bold and need Company logo as icon) in Cross platform. Please help me on that.

Ответить
TheLinkimos
TheLinkimos - 02.12.2022 15:11

Hi Gerald,
Is that possible to implement push notifications in Xamarin while app is closed?

Ответить
Mayur Kakad
Mayur Kakad - 25.11.2022 12:16

Hi @gerald. For some devices Device token is not getting generated. Can you tell me the reason or any input on this? Those are the android devices

Ответить
xxThemoritzxx
xxThemoritzxx - 18.11.2022 01:51

Brilliant, any changes for MAUI? Is Windows working as well? Greetings

Ответить
Praveen Rajendiran
Praveen Rajendiran - 09.11.2022 15:33

Hi man - I have got a token sent a notification through the Cloud messaging ,but didn't get any notifications

Ответить
Learn Wih Ash
Learn Wih Ash - 07.11.2022 20:42

Hi, I am using Visual studio 2022 and getting this error Java.Lang.IllegalStateException: 'Default FirebaseApp is not initialized in this process com.companyname.homepagedesign. Make sure to call FirebaseApp.initializeApp(Context) first.'
also the xamarian.googleplay.base does not installed in my project could you please help?

Ответить
Juan Rodríguez
Juan Rodríguez - 07.11.2022 17:04

We need this video again for MAUI :( pleeaaaaaase

Ответить
Soundwave
Soundwave - 13.10.2022 00:23

does this work the same with MAUI?
i'm a student at PXL Hasselt and we have to make a project with MAUI

Ответить
Michael Ndjibu Lukusa
Michael Ndjibu Lukusa - 18.09.2022 19:03

Hello Gerald, thanks for this tutorial. have you ever implemented the part where the app is close?

//Handle notification when app is closed here CrossFirebasePushNotification.Current.OnNotificationReceived += (s, p) => { };

How can one open the app from here? thank you.

Ответить
Swaroopa Diaries
Swaroopa Diaries - 02.09.2022 13:37

Thank you Gerald 🌹 , Very Well Explained. Now I want to implement through code. Can You Please Suggest Something so that I could work on it.

Ответить
ComeAndGetSome
ComeAndGetSome - 26.08.2022 13:51

Thank You so much Boss. I have managed to implement Push Notification on MAUI as well using the same technique. God bless you

Ответить
Asaf Goldman
Asaf Goldman - 04.08.2022 09:37

Thanks Gerald, can you please make a tutorial for sending push notifications using MAUI for Android and iOS?

Ответить
INTE͎RPRE͎TE͎R
INTE͎RPRE͎TE͎R - 26.07.2022 00:16

Thanks for you🖤🖤

Ответить
Александр Геворкян
Александр Геворкян - 13.07.2022 14:05

Could you please give an advice , my app is installed approximately on 100 phones , but only 25-30 phones received notification, what should i do?

Ответить
pratik shroff
pratik shroff - 12.07.2022 16:50

Thanks Gerald for Amazing video, I am able implement this and receive push notification. I have one problem I am not able receive notification when app is in closed or app is in the foreground, can you please provide details how to receive notification in android when app is in different conditions?

Ответить
Andrew Glasgow
Andrew Glasgow - 06.07.2022 03:00

For my app, I have the text message sender call and api that sends their message where the API stores the message with an associated conversation. It's a one-to-many relationship in my database (Conversation-->Messages and Conversation-->Subscribers).
I want the API to also use Firebase to send a push notification to all other recipients in the conversation (usually just one) so that their app automatically calls an API to refresh all messages in the conversation and display any new/unread messages with a dot. How would I trigger the recipients to call api to refresh the conversation and show in phone app?

Ответить
Liliane Soliman
Liliane Soliman - 30.06.2022 17:25

Very Nice tutorial, thank you so much but I got this "Failed to get FIS auth token" any idea what is the problem ?(note: I made sure that the app name. id is the same)

Ответить
Rey Anthony Flores
Rey Anthony Flores - 28.06.2022 15:02

Hi when I try to update to the latest version nuget package of the FCM it says 'FirebasePushNotificationManager' does not exist in the current context

Ответить
Victor
Victor - 03.06.2022 00:38

This plugin only works in debug mode, not in release mode.

Ответить
Shivani Naeck
Shivani Naeck - 02.06.2022 14:18

Great video. Learn a lot.
But is there a more dynamic way to send the notifications rather than each time passing the tokens on the FCM Registration token?

Ответить
Abhishek Singh
Abhishek Singh - 01.06.2022 09:28

Hi sir thanks for the great video on notification.
I have one query regarding action button on notification.
As i have added two action button in the notification name as "Accept" and "Reject".
When I am sending the notification the action button is showing in notification when my application is in foreground, but when my application is in background or killed the notification is showing without action button.

Ответить
HD,gmar
HD,gmar - 25.05.2022 22:02

excellent !! <3 keep making such good content.
can we have a tutorial on Maui fcm push notification, please

Ответить
MS G
MS G - 17.05.2022 04:01

Thank you!, one thing to notice, it doesn't work with the latest version and Android 12 either, have to see what changed and what's needed to adjust (at least in my case)

Ответить
Luis Caballero
Luis Caballero - 04.05.2022 05:52

Thanks for the videos.

Please can you tell me how to solve the problem that
Firebase Cloud Messaging does not work in release mode but in debug mode, I tried everything and I can't solve the problem

Ответить
Ahmed TXT
Ahmed TXT - 01.05.2022 15:47

I can't find Token ???? any Help

Ответить
Technically Superior Solutions
Technically Superior Solutions - 30.04.2022 00:20

Watched your video and Followed every step....everything worked great up until i got to the first test. First Test message worked great...got the token from the output. But...after that i ran into an issue....after refreshing the the app it did not generate the Token in the output. Tryna figure out why at the moment. Any idea why it doesnt generate any longer?

Ответить
Anthony Mattocks
Anthony Mattocks - 29.04.2022 21:52

I am running into Xamarin.googleplayservices.117.0.05 is not compatible with mono android 11.0

I am on windows machine.

using Visual Studio 2019. Do I have to upgrade to visual studio 2022

Ответить
Girish kumar
Girish kumar - 27.04.2022 12:48

hi Gerald,
1. Can we create a dynamic message.I mean getting values from SQL DB and populate dynamic message to user.
2. Can we send user specific message?
Thanks

Ответить
Justas Kvederis
Justas Kvederis - 26.04.2022 22:34

It doesn't work on .net Maui, the plugin clashes with google services.base and gives an error, I tried the newest updated version, and the old one that you used in video, would be nice, to get an update, especially now when .net Maui is in release candidate stage.

Ответить
Antract
Antract - 19.04.2022 11:46

Great video ! Can you do a tutorial for MAUI Push notifications using either FCM or Azure ?

Ответить
Angel B. Vasquez
Angel B. Vasquez - 17.04.2022 22:38

Hey Geral, why don't you send it through the application, I mean in the code, so it could be configured as when you send a request that notifications arrive and the developer didn't have to interact by sending it

Ответить
Dream Hunter
Dream Hunter - 16.04.2022 15:28

Thanks Sir, I am getting error FirebaseInstanceId: Token retrieval failed: SERVICE_NOT_AVAILABLE. Please help me on this. Previously it was working perfectly.

Ответить
Vuyiswa Maseko
Vuyiswa Maseko - 14.04.2022 23:22

Good Day Gerald , how do i customize the notification with icons and a different background , did you create a video already for that ?

Ответить
Talk Be
Talk Be - 13.04.2022 12:03

hello Gerald, the problem is that when i publish the backend to azure the notification push will not work, i even used notification hub from azure, i couldnt register my device to receive notification could you please share for us some knowledge there.

Ответить
INTE͎RPRE͎TE͎R
INTE͎RPRE͎TE͎R - 09.04.2022 17:46

Hello,
I really need your help
I have created a xamarin.forms project
And i connected it to an SQL Server database
I want to Send notification to clients when ever a condition occured, i mean i want to check the data into the database every day, if the data matched with a specific data, i want all clients(Users) get a specific notification
How can i do that?

Ответить
July Brown
July Brown - 30.03.2022 16:20

Hi Gerald, thank you so much for this video it means a lot. Am new to this and I was debugging this on physical device today and somehow the notifications aren't going through. Is there something am missing?

Ответить