Bro, Its working fine with android Oreo, but when i move to android pie, the code which we have written is deprecated and Applcation get crashed when i send push notification, in debug mode i got the bellow error Java.Lang.RuntimeException: Unable to instantiate receiver com.google.firebase.iid.FirebaseInstanceIdInternalReceiver: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" on path: DexPathList[[zip file "/data/app/com.isat.GraduateGuru-tmLocHA5EVv0pwFs-XolYg==/base.apk"],nativeLibraryDirectories=[/data/app/com.isat.GraduateGuru-tmLocHA5EVv0pwFs-XolYg==/lib/arm64, /data/app/com.isat.GraduateGuru-tmLocHA5EVv0pwFs-XolYg==/base.apk!/lib/arm64-v8a, /system/lib64]] Is there any way to come out of this issue? or is there any separate implementation? thank you
Hi i am using vs 2019 and facing an error in Notificationhelper class Resource doesn't contain a definition for raw... please suggest what should i do to overcome this bugs
Getting an Error "java.exe" exited with code 1. While checking the Buld Log it says " PROGUARD : warning : there were 100 unresolved references to classes or interfaces. 1> PROGUARD : warning : there were 2 unresolved references to program class members.". Please suggest what to do? Disabling the Proguard option in Release mode solves the problem but in that case the app size increases.
Great. I am getting an error @ mBuilder.SetChannelId(NOTIFICATION_CHANNEL_ID); NotificationCompat.Builder does not contain a definition for SetChannelId.
Hi first of all thank you for this tutorial. But i'm having some troubles, first the notification doesn't show on Head-up display and the sound + vibrate doesn't execute as well. Do you have a solution for this?
Sir, How can I achieve suppose I added a new employee from another project's FORM(responsible to add the employee) to database and in our xamarin project the notification appears about that employee and on clicking on that notification the details should be shown inside a page
@@SPTutorials Sir, I am a newbie to Xamarin, please can you elaborate or send me any link or video where I can get some idea about this. And thanks for you replay, highly appreciated !
Dear I recommand to you,to join my online xamarin training.It will help you to learn xamarin easily and deeply.Ton know more details you can contact whatsapp +918444835044
So in your video, since you didn't implement it does it mean that the google firebase server doesnt care about it to make the cloud messaging working ? As I understand from your explanation, the device must send this token to the google firebase server to register itself. This implementation should be something common? right? Btw your video is very instructive. we really appreciate it
Dear,saving the token to the database,its a user responsibility,not google.Because we manage our database externally.So that we dont need the dependency of google for saving token.
Thank you very much. I finally get it. It was little bit complicated for me to understand the data flow since the API did a lot of thing automatically. The API actually send the firebase token to the google cloud messaging at the very first time without any need of coding.
@@BlalKhalidTech You dont need to send data to firebase.After saving data to sql server database,just call firebase API for sending message to user.Learn firebase properly
Nice videos on notifications! I was wondering, is it possible to use Firebase to send client to client notifications? (One user of the app on one phone sends notification to another user using the same app on another phone)
Hi Sir, i have problem when installing Xamarin.Firebase.Messaging and xamarin.googleplayservices.base. it says not compatible with netstandard2. i already download net 3.0 but cannot change in my project at Target framework. please help me to solve this sir. thank you.
netstandar2 error is because you need to install it on android project not on the whole project. You need to check if the package is intended for only IOS or Android or if it doesn't have a property. Usually says in the name. Example. Xamarin.Firebase.IOS.Core, Xamarin.Firebase.Android.Core etc. Also the Firebase.Messaging Nuget package is faulty, I see that its been 8 months ago since you posted this comment, but their versions still contains bugs and shows errors when running them, so that's why he used another version of Firebase.Messaging package in the video if you noticed. AND.....don't forget to clean and rebuild after each nuget installation for it to take its place in the IDE.
Great explanations.. I have implemented this code in my xamarin forms application so i got the notifications when my app is running conditions. But when i have killed my app so notification is not coming just like whatsapp, linkdin and other applications. So can you please let me know what should i need to do when my app is killed and I can get the notifications? Thanks in advance :)
Its a big deal to implement this,read this and you can understand what you need to implement for achive your requirements www.quora.com/How-does-WhatsApp-or-Gmail-receive-notification-even-after-force-closing-them
Thanks for the guidance but there are two queries i want to have a look at it first- app icon is not able show in notification second- i want to navigate user to playstore on the click of notification
if your applicationId variable is not in global,then remove this and directly set your package name here. Example android:name="com.yourrPackageName.android" just replace this.(get your package name from android project properties.)
when receive firebase message then pass this message using messaging center and show display message.Simply use messaging center.Watch my messaging center video carefully.
Could be the Firebase.Messasing Nuget Package that is something wrong with, check log if it shows any errors or simply increase your framework from android pie(9) to (Q. 10) or (11.R)
Bro, I had one doubt, In the video you told that we can save generated token(device ID) into db, without any login information how can we save? or How can we get that device Id after login into the app? How can we access that device id wherever we want in application? thanks in advance !
Dear its a simple logic.Follow these step 1.After getting device token save it to a session preference variable(Xamarin Essestials Preference).so that it will be saved as a cache. 2.Next,After user login fetch that preference cache value(device token whichone you saved).And send it to the server.Bcz after login you got your username and the token whichone you saved. 3.Every time save the token to the preference,when it generate Second logic: You can save this token by your android device unique id. now its your choice which logic you should use. I think you can understood this now. :)
@@SPTutorials Bro, I find out the how to store token, but that token itself not generating because "OnTokenRefresh()" Method itself not calling at all in the class "MyFirebaeIIDService". any idea?
The override method OnTokenRefresh from MyFirrbaseIIdService class.You will get the token from refreshedToken variable.And this token is user specific.
Nice tutorial !! Works good. What about if I want to send a notification to specific user when I click some button in my app? for example, I click a button in my app that says "Alert to John" and then John receives a notification that says "Hey John, David Alerted You!"
Its preety easy,using token you can send notification anyone.First you need to save all users token to your database.When you click on button then fetch the user token from your database and send notification using firebase rest API.
@@SPTutorials Thanks for the reply and your time. Yes, it is what I imagined and had in mind but I have no idea how to implement it since it is my first app in xamarin and I can't find anything that explains this with any example in C#
Thank you for the guide! Do you by chance have an iOS version setup or a link to it?
Thanks bro, after some time i reopened app and checked working fine. Thanks bro, you saved my life. God Bless you..
I was already thinking that push notification in Xamarin only worked in ancient times ... Thanks so much for your contribution!
Bro, Its working fine with android Oreo, but when i move to android pie, the code which we have written is deprecated and Applcation get crashed when i send push notification, in debug mode i got the bellow error
Java.Lang.RuntimeException: Unable to instantiate receiver com.google.firebase.iid.FirebaseInstanceIdInternalReceiver: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" on path: DexPathList[[zip file "/data/app/com.isat.GraduateGuru-tmLocHA5EVv0pwFs-XolYg==/base.apk"],nativeLibraryDirectories=[/data/app/com.isat.GraduateGuru-tmLocHA5EVv0pwFs-XolYg==/lib/arm64, /data/app/com.isat.GraduateGuru-tmLocHA5EVv0pwFs-XolYg==/base.apk!/lib/arm64-v8a, /system/lib64]]
Is there any way to come out of this issue? or is there any separate implementation?
thank you
Do you have by chance a working sample of iOS too? OR that is already implemented in the sample source code?
Hi i am using vs 2019 and facing an error in Notificationhelper class Resource doesn't contain a definition for raw... please suggest what should i do to overcome this bugs
you have to add a folder name "Raw" inside resource folder and put your file there.
Thank you very much! I have been struggling with this issue for weeks
Very clear explanation..great!
Getting an Error "java.exe" exited with code 1. While checking the Buld Log it says " PROGUARD : warning : there were 100 unresolved references to classes or interfaces.
1> PROGUARD : warning : there were 2 unresolved references to program class members.". Please suggest what to do? Disabling the Proguard option in Release mode solves the problem but in that case the app size increases.
Use linker option as Sdk Aasemblies Only and enble Multi-Desk from Android options.
I have a small question. how can i do an action when notification received ? should i creat an interface or something ? can u help me with that ?
Can Xamarin allow users to send push notifications to other users? Like an Administrator having special permissions on their app?
yes it can.
@@SPTutorials Do you have a tutorial similar to this idea? Thanks!
Great.
I am getting an error @ mBuilder.SetChannelId(NOTIFICATION_CHANNEL_ID);
NotificationCompat.Builder does not contain a definition for SetChannelId.
Thanks was very helpfull, best regards
Can you please tell me how do I get fcm token for my device which you pasted @1:50 ??
Latest xamarin firebase messaging plugin changes,you will get an OnTokenReceived override function inside FirebaseMessagingService class
@@SPTutorials Yes I solved it.. btw thanks for the reply. The video was great🙏😊
Excellent video, but a question as I show the notifications that are in the background. I would appreciate your answers.
Hi first of all thank you for this tutorial. But i'm having some troubles, first the notification doesn't show on Head-up display and the sound + vibrate doesn't execute as well. Do you have a solution for this?
debug your code properly.
Sir, How can I achieve suppose I added a new employee from another project's FORM(responsible to add the employee) to database and in our xamarin project the notification appears about that employee and on clicking on that notification the details should be shown inside a page
You have to pass the data payload notification,then notify to your device,and you can extract the payload from notification click intent.
@@SPTutorials Sir, I am a newbie to Xamarin, please can you elaborate or send me any link or video where I can get some idea about this. And thanks for you replay, highly appreciated !
Dear I recommand to you,to join my online xamarin training.It will help you to learn xamarin easily and deeply.Ton know more details you can contact whatsapp +918444835044
@@SPTutorialsThanks for your reply , will join contact on whatsapp. And again thanks
Thankyou, from where we can get firsbaseinstanceid
In the file MyFirebaseIIDService how do you implement the method SendRegistrationToServer to send the newtoken back to firebase server ?
yes,when you will received the new token always update it to the server.Its your custom logic,how you save it.
So in your video, since you didn't implement it does it mean that the google firebase server doesnt care about it to make the cloud messaging working ? As I understand from your explanation, the device must send this token to the google firebase server to register itself. This implementation should be something common? right? Btw your video is very instructive. we really appreciate it
Dear,saving the token to the database,its a user responsibility,not google.Because we manage our database externally.So that we dont need the dependency of google for saving token.
Thank you very much. I finally get it. It was little bit complicated for me to understand the data flow since the API did a lot of thing automatically. The API actually send the firebase token to the google cloud messaging at the very first time without any need of coding.
How to get token device?
Did you find?
hi i am working xamarin Forms with Sql Server Database i want to show notification to all users when data insert in specific table
Thanks
use firebase,after succesfully save data to table then send notification to users.
@@SPTutorials how i send me server data to firebase?
@@BlalKhalidTech You dont need to send data to firebase.After saving data to sql server database,just call firebase API for sending message to user.Learn firebase properly
@@SPTutorials kindly help to share code..... thanks in advance
Nice videos on notifications! I was wondering, is it possible to use Firebase to send client to client notifications? (One user of the app on one phone sends notification to another user using the same app on another phone)
Yes,using the token.
@@SPTutorials Hi great tutorial - any example how to send notification to specific token device?
Hi Sir, i have problem when installing Xamarin.Firebase.Messaging and xamarin.googleplayservices.base. it says not compatible with netstandard2. i already download net 3.0 but cannot change in my project at Target framework. please help me to solve this sir. thank you.
Install latet XF version,also use latest target framework.Then try.
netstandar2 error is because you need to install it on android project not on the whole project. You need to check if the package is intended for only IOS or Android or if it doesn't have a property. Usually says in the name. Example. Xamarin.Firebase.IOS.Core, Xamarin.Firebase.Android.Core etc. Also the Firebase.Messaging Nuget package is faulty, I see that its been 8 months ago since you posted this comment, but their versions still contains bugs and shows errors when running them, so that's why he used another version of Firebase.Messaging package in the video if you noticed. AND.....don't forget to clean and rebuild after each nuget installation for it to take its place in the IDE.
Great explanations..
I have implemented this code in my xamarin forms application so i got the notifications when my app is running conditions. But when i have killed my app so notification is not coming just like whatsapp, linkdin and other applications.
So can you please let me know what should i need to do when my app is killed and I can get the notifications?
Thanks in advance :)
Its a big deal to implement this,read this and you can understand what you need to implement for achive your requirements
www.quora.com/How-does-WhatsApp-or-Gmail-receive-notification-even-after-force-closing-them
any idea dude how you do it ?
Thanks, bro it's working for me
Thanks for the guidance but there are two queries i want to have a look at it
first- app icon is not able show in notification
second- i want to navigate user to playstore on the click of notification
Firebaseinstanceiid is deprecated, what to do now..
Use FirebaseMessagingService class,inside this you will get token.
@@SPTutorials will there be any change in the manifest then
@@SPTutorials notification compact is obsolete, but tried converting to notification class...but there is not set title method in it
Thanks for the video on Android. Would appreciate if you can post the same on iOS.
Did you find an iOS Example?
is converted to when i build and showing the errorTag attribute name has invalid character '$'.
if your applicationId variable is not in global,then remove this and directly set your package name here.
Example android:name="com.yourrPackageName.android"
just replace this.(get your package name from android project properties.)
hi, how firebase message to display as display alert on xamarin?
when receive firebase message then pass this message using messaging center and show display message.Simply use messaging center.Watch my messaging center video carefully.
@@SPTutorials thank you, its work
@@SPTutorials Hi again, how get data in additional options of firebase messaging?
@@MrJesha28 See docs.
Thanks for this tutorial but I am not receiving notification when app is killed. Can you please guide me how to use data message for this?
For data message you have to send a specific payload, you can see firebase docs for more info.
Thanks bro, Coded without any error. Sending Messages from firebase not displaying in mobile phone (android pie) any reason?
Follow all steps properly.
Could be the Firebase.Messasing Nuget Package that is something wrong with, check log if it shows any errors or simply increase your framework from android pie(9) to (Q. 10) or (11.R)
Bro, I had one doubt, In the video you told that we can save generated token(device ID) into db, without any login information how can we save? or How can we get that device Id after login into the app? How can we access that device id wherever we want in application?
thanks in advance !
Dear its a simple logic.Follow these step
1.After getting device token save it to a session preference variable(Xamarin Essestials Preference).so that it will be saved as a cache.
2.Next,After user login fetch that preference cache value(device token whichone you saved).And send it to the server.Bcz after login you got your username and the token whichone you saved.
3.Every time save the token to the preference,when it generate
Second logic:
You can save this token by your android device unique id.
now its your choice which logic you should use.
I think you can understood this now. :)
@@SPTutorials Bro, I tired the 1st one, but that token not coming, its return always false because no token, 2nd Logic i won't get.
@@manjunathams8958 Do it correctly.
@@SPTutorials Ya i did it what you say, no error but token is always empty :(
@@SPTutorials Bro, I find out the how to store token, but that token itself not generating because "OnTokenRefresh()" Method itself not calling at all in the class "MyFirebaeIIDService". any idea?
Hi, can you do video on fcm push notifications with image in Android and iOS, it will help us.
Perfect !! Thank you !!
where do i get the user token for specific user?
The override method OnTokenRefresh from MyFirrbaseIIdService class.You will get the token from refreshedToken variable.And this token is user specific.
@@SPTutorials thankyou!!
Log it in console inside the OnTokenRefresh method
Will you given a tutorial for AdSense?
Dear,can you tell me what exactly you want to say?
@@SPTutorials I am taking about admob.
Okay
@@SPTutorials Thank you so much.
Nice tutorial !! Works good. What about if I want to send a notification to specific user when I click some button in my app? for example, I click a button in my app that says "Alert to John" and then John receives a notification that says "Hey John, David Alerted You!"
Its preety easy,using token you can send notification anyone.First you need to save all users token to your database.When you click on button then fetch the user token from your database and send notification using firebase rest API.
@@SPTutorials Thanks for the reply and your time. Yes, it is what I imagined and had in mind but I have no idea how to implement it since it is my first app in xamarin and I can't find anything that explains this with any example in C#
can anyone share Playlist for full implementation???
how can we send image and icon from firebase ?
like any message, just convert it to base 64
Hello, thank you for the tutorial ...
Please send us the NotificationHelper file ..
Oh, I did not pay attention, you put the GIThub link .. Thank you
i have 7 errors in NotificationHelper.cs
i copy your code in github.
thanks
add the namespace,and also install the required libraries.
Good,What about IOS?
Will upload it soon.
thank you very gooooooood , Please for IOS if you can
Bro i need your help i there any way to contact you?
spaltutorials@gmail.com
Really appreciate.
Pleae give Firebase push notification for iOS tutorial
Can you create a new tuto to push notification in xamarin?
I already have this,check on my playlist
What happened with iOS
Will upload it soon.
@@SPTutorials not updated to ios. I am waiting sir
not updated to ios. I am waiting
@@SPTutorials not updated I am waiting
Thanks a lot!
Some tutorial about background services in xamarin forms
Dear,Already have that,find it from the playlist.
@@SPTutorials thanks, this video is great, will you have more videos about notifications?
Will upload it after few days.
@@SPTutorials great, greetings from Mexico
mam/ sir please make video on login and sign up page with firebase, please
thanks