Thank you very much! Your tutorial really helped me as this is my first time working with push notifications. My application however does not display the new notifications once i add the code to iterate the device tokens. Really appreciate your feedback
thank you for the tutorial . 1 question though , where is "_configureFirebaseListeners() " function referenced in the app? not atleast in the written tutorial.
Can we create cloud functions in such a way that the notifications is sent after certain duration of changes happened in the database, say 1 hour later after adding a new message or something like that????
hi bro .. very thankful for the content you provide ... every thing is working fine but am not getting sound when i run on a device .. the notification is available in the notification pannel but not giving any sound or not showing when locked... when i enable permissions manually going to setting then its getting sound and showing banner when notification arrived... is there way to enable permissions by asking user.... plz answer my question
which terminal are you using to install firebase tools , i am using adroid studio terminal to run "npm install -g firebase-tools" but it is not working , I am getting below message 'npm' is not recognized as an internal or external command, operable program or batch file.
@@MobileProgrammer no I mean i will be sending a specific url in notification Everytime I want that on clicking it user should be directed to that specific link without opening the app. How can this be done ?
@@MobileProgrammer thankyou for answering just one qsn can we modify the click_action in data of payload in index.js to open link ? Bcoz on stack overflow I saw that but it's not working
How to send particular device ! I stored token in user/uid/document and i can't access uid in firebase function mean when user buy product notify the unique admin app that product buyed by user uid
You need the device token of the device where your admin app is installed to send to that particular Device like I show in this video. What do you mean by you can't access uid in firebase?
I think the most practical thing will be to save the token of the user's device in the document where you will save the purchase data, so you can recover it from the snapshot, as well as recover the message that you saved in the document, you will see it in minute 26:09 of the video
Or may be u can just save the uid in your product document..... Which will also guarantees u to get the data of the user who purchased that product... I guess....
@@MobileProgrammer Can I take the user's device token if he has not registered to firebase yet ? ie, Before creating his user account in the firebase authentication?
Thanks a lot for this... Currently having issues in my code though. The onLaunch does not work. When I send notifications from firebase when my app is closed, I don't receive it on my device
I don't know if you could solve the problem but I just fixed it after two days. I saw your comment and thought someone else may have the same issue. It seems like you need to activate background messing for OnLaunch call back. My app would crash (myapp keep stopping window) whenever I received a push notification in the background/onLaunch. Here is a good video but it's old. th-cam.com/video/al_og4iUiqY/w-d-xo.html&ab_channel=LazyTechNo (This is.a newer video but I didn't follow this one: th-cam.com/video/PrnxksGQ210/w-d-xo.html&ab_channel=EasyApproach ) my app works without changing the mainActivity.kt. Also I didn't change Android:value because the video was old. you can get the code for display notification and Notification_action from firebase messaging page on pub.dev. I hope it helps.
If you have already added it will work. Make sure you don’t have more than 64 notifications added for iOS. There is a limit in iOS if you add more it will not trigger.
and this also appear to me when function executed... Billing account not configured. External network is not accessible and quotas are severely limited. Configure billing account to remove these restrictions
Sir , onResume() is not called when the app is terminated and also the notification is not printed onto the console when i am using real device bu the notification comes . I know that we have to add the 'click_action' and i added also. Why is it so ? Please Help if possible because i am stuck in it from so many days .
great lesson ... i am trying to notification but error appear to me in log Error: Registration token(s) provided to sendToDevice() must be a non-empty string or a non-empty array eny help will be appreciated
@@MobileProgrammer I have checked tokens string many times. Is the billing account affect that because I am now in free plan ...... is this way send notifications for multiple devices
please i want to send notification to each user when they are chatting privatly, and also i want to send notification to a group of people that are in a group just like what app please help i will be very glade if you can do it
@@MobileProgrammer I got my functions deployed . But its only triggered when we make change through console . Its not triggered when a collection is updated through app
@@MobileProgrammer how to make a notification, when the notification comes and is clicked, it goes straight to the notification, for example, such as a message, or promo,
@@MobileProgrammer I want to make a push notification from the backand, and the mobile receives a notification, after clicking the notification, the message opens immediately
i got this error in log ReferenceError: Console is not defined at exports.messageTrigger.functions.firestore.document.onCreate (/srv/index.js:23:9) at cloudFunction (/srv/node_modules/firebase-functions/lib/cloud-functions.js:131:23) at /worker/worker.js:825:24 at at process._tickDomainCallback (internal/process/next_tick.js:229:7)
TH-cam may be still processing my video or you can try changing the video resolution in the video settings itself. I always upload my video in 1080p or 4K resolution.
I would want to have a Carousel/Swiper/Row that elements( images / icons ) follow path of curve ( Arc ), I want to scroll the elements in curve path not in straight path , Please share if u have any idea . you can check the example in link below ( flutter) : github.com/walmartlabs/curved-carousel
thank you, you have been the only one who was this straight forward about developing cloud functions along with flutter that I could find
I was literally searching for Flutter push notifications using cloud functions and alas! I found the best tutorial!
This is the real content! Thank you so much, very helpful!
You are welcome
My dude, this is so helpful and straight forward!
Thank you and Godspeed.
Very nice video, i am implementing firebase messaging and firebase function on my Flutter Project according to your explanation. Thanks again.
Learnt so much from your Channel. Keep up the good work. Looking forward for more.
Excellent. tutorial
Very good tutorial. Thank you.
Thanks, very helpfull
Thank you dude your content is really useful good luck :3
Thank you!. This helped me got started.
You are welcome
Thanks You for this tuto. It's simple and clear. Great Job!
very nice and helpful video .
This is such an awesome video. Great. Thanks
Such a great video very helpful and simple explanation thank you soo much
You are wc
Amazing! congratulations!
Thank you very much! Your tutorial really helped me as this is my first time working with push notifications. My application however does not display the new notifications once i add the code to iterate the device tokens. Really appreciate your feedback
It’s difficult without seeing the code. Are you sure you have proper device tokens?
Excellent video, thank you so much!
You are welcome
Cloud function nice
very very really very thx!! Mobile Programmer!
You are welcome.
thank you for the tutorial . 1 question though , where is "_configureFirebaseListeners() " function referenced in the app? not atleast in the written tutorial.
_configureFirebaseListeners is in the written tutorial as well as Video tutorial. Please check again.
Hey can you maybe uploaded a updated version that will be great . Because i think a lot have changed
I learned a lot from you thank you
Good to hear that. Thanks
Me too.
Thanks for the great tutorial. Is it possible to create a Heads Up notification with Flutter at the moment? If yes, can you please guide?
Great lesson.. how can perform trigger in button click when inserting new record to fire the cloud function trigger
I want give you 1000 like 👍. But TH-cam not agree. 😀
Thank very helpfull
😀 thanks a lot buddy. Please support.
Hi, Nice video. What do you have to change for device to device notification?
Awesome. Thankyou bro
You are welcome
@@MobileProgrammer Bro how to show notification when the app is in foreground?
Local notifications?
@@MobileProgrammer yes i was thinking the same. We can use that flutter local notification plugin in onMessage section
Could you upload another video including recent updates with null safety?
I will try.
Doing an amazing job!!
Can we have action buttons on the custom notifications from firebase?
thank you
You are welcome
does this tutorial still work in 2022? or there are changes in order for it to work ?
Can we create cloud functions in such a way that the notifications is sent after certain duration of changes happened in the database, say 1 hour later after adding a new message or something like that????
Have you tried with node 10 or higher ?
I think it requires a billing account, if I am mistaken please reply..
Great tutorial.
Can I send a message to all devices without tokenID ?
If clients subscribe to a topic, then yes, you can send message to that particular topic and everyone should receive it.
Is it fast?
Yes
@@Faslurraja yes
hi bro .. very thankful for the content you provide ... every thing is working fine but am not getting sound when i run on a device .. the notification is available in the notification pannel but not giving any sound or not showing when locked... when i enable permissions manually going to setting then its getting sound and showing banner when notification arrived... is there way to enable permissions by asking user.... plz answer my question
which terminal are you using to install firebase tools , i am using adroid studio terminal to run "npm install -g firebase-tools"
but it is not working , I am getting below message
'npm' is not recognized as an internal or external command,
operable program or batch file.
It’s not about the terminal. Node is not set as a global command in your system.
I'm getting function deployement error.
trust me no body will show u a gold mine
How can we open a specific website on clicking on a push notifications?
Is there any click_action for opening url in push notifications?
You can get click action inside the app and rest is your world, you can do what ever you want.
@@MobileProgrammer no I mean i will be sending a specific url in notification Everytime I want that on clicking it user should be directed to that specific link without opening the app. How can this be done ?
You cannot do that without opening the app.
@@MobileProgrammer thankyou for answering just one qsn can we modify the click_action in data of payload in index.js to open link ? Bcoz on stack overflow I saw that but it's not working
How do I implement the same if I use MySQL and NodeJS for my backend
Could you please share your github repo?
I've been trying to implement background messaging but it is not working
bitbucket.org/vipinvijayan1987/tutorialprojects/src/FirebaseMessaging/
How to send particular device ! I stored token in user/uid/document and i can't access uid in firebase function mean when user buy product notify the unique admin app that product buyed by user uid
You need the device token of the device where your admin app is installed to send to that particular Device like I show in this video. What do you mean by you can't access uid in firebase?
I think the most practical thing will be to save the token of the user's device in the document where you will save the purchase data, so you can recover it from the snapshot, as well as recover the message that you saved in the document, you will see it in minute 26:09 of the video
Or may be u can just save the uid in your product document..... Which will also guarantees u to get the data of the user who purchased that product... I guess....
My use case is also very similar to urs...and i implemented in above mentioned manner... And it works... :D
how to open the project in the editor in index.js ?
How do you include data in your payload that is in a different collection to the one that triggers the function?
26:00 I don't understand where your link between index.js and the UI is. How is your index.js communicating with your UI to update that list?
Index.js is in the server node js project. I m mentioning this in the video. It’s not part of flutter project.
@@MobileProgrammer So when you make a change in the index.js it's not changing anything in the flutter app?
what if i want to send a notification to specific person. How can i send his id to the cloud function ?
When the user registers with Firebase, he will be assigned a device token for his device. with that token you can target that user.
@@MobileProgrammer Can I take the user's device token if he has not registered to firebase yet ? ie, Before creating his user account in the firebase authentication?
I want to send a notification to a specific user after an action in my app , should i use cloud Functions ?
It’s up to you, otherwise no need.
Sir how to send to all by using condition parameter
Thanks a lot for this... Currently having issues in my code though. The onLaunch does not work. When I send notifications from firebase when my app is closed, I don't receive it on my device
I don't know if you could solve the problem but I just fixed it after two days. I saw your comment and thought someone else may have the same issue. It seems like you need to activate background messing for OnLaunch call back. My app would crash (myapp keep stopping window) whenever I received a push notification in the background/onLaunch.
Here is a good video but it's old.
th-cam.com/video/al_og4iUiqY/w-d-xo.html&ab_channel=LazyTechNo
(This is.a newer video but I didn't follow this one: th-cam.com/video/PrnxksGQ210/w-d-xo.html&ab_channel=EasyApproach )
my app works without changing the mainActivity.kt. Also I didn't change Android:value because the video was old. you can get the code for display notification and Notification_action from firebase messaging page on pub.dev. I hope it helps.
Thanks a lot for this
Will check it out
how to get current user id in function?
How can i schedule a notification from the App?
You can add the local notifications flutter package
@@MobileProgrammer Already done, the main problem is that when i reboot phone the notifications doesnt work
If you have already added it will work. Make sure you don’t have more than 64 notifications added for iOS. There is a limit in iOS if you add more it will not trigger.
Also the user should accept the notifications permission
@@MobileProgrammer im tesron5 in Android, however other notifications than schedule from the plugin doesn't work
i want to send the notification onUpdate()..... how do i get the data that is updated ? Please can you help me out
and this also appear to me when function executed... Billing account not configured. External network is not accessible and quotas are severely limited. Configure billing account to remove these restrictions
Sir , onResume() is not called when the app is terminated and also the notification is not printed onto the console when i am using real device bu the notification comes . I know that we have to add the 'click_action' and i added also. Why is it so ? Please Help if possible because i am stuck in it from so many days .
how to store complete paragraph of text in firebase?
You can store it like just any other text
great lesson ... i am trying to notification but error appear to me in log Error: Registration token(s) provided to sendToDevice() must be a non-empty string or a non-empty array eny help will be appreciated
Please check your token string
@@MobileProgrammer
I have checked tokens string many times. Is the billing account affect that because I am now in free plan ...... is this way send notifications for multiple devices
It should work
please i want to send notification to each user when they are chatting privatly, and also i want to send notification to a group of people that are in a group just like what app please help i will be very glade if you can do it
The same way.. How can I do it in android studio..Can you please help me out.. doing the same process without flutter
How can i get firebase messaging folder
is it compusory to send tokens along with payload while sending push notification?? how can we send to all devive ..please reply anyone
does this work for iOS ?
Yes
I am facing a issue while deploying the code, it says "Parsing error: Unexpected token =>".
Are you using the latest version of the library?
@@MobileProgrammer Yes
In that case you might have to check the plugin docs. Something might have changed
@@MobileProgrammer Ok
@@MobileProgrammer I got my functions deployed . But its only triggered when we make change through console . Its not triggered when a collection is updated through app
Without firebase?
Firebase is the recommended way to send push notifications or you can use firebase apis
You can use OneSignal.
you are not coding this live right? :D
😊
in "Add Firebase to your Android app
" step 4, i con not verify installation my app.
I uninstall my app but dont work!!
Make sure you have correct google-services.json in the proper folder. then it will definitely work.
Hi, please I'm getting an error saying: error uploading messageTrigger...
I have followed all the steps, but in FlutterCloudFunctionDemo project folder there is no file created :(
I am getting the error message ("Error sending notification")in logs of cloud functions
Are you sending to the proper device token?
@@MobileProgrammer Hi, what if I just want to send notifications to the app, so that all users of the app can see it....how would I do that?🙏
Help me.
Function log:
Error: Messaging payload contains an invalid value for the "data.message" property. Values must be strings.
Help
A non-null String must be provided to a Text widget.
'package:flutter/src/widgets/text.dart':
Failed assertion: line 360 pos 10: 'data != null'
Your text is null in your text widget
@@MobileProgrammer thank you so much
@@MobileProgrammer
how to make a notification, when the notification comes and is clicked, it goes straight to the notification, for example, such as a message, or promo,
Check my local notifications video please
@@MobileProgrammer I want to make a push notification from the backand, and the mobile receives a notification, after clicking the notification, the message opens immediately
i got this error in log
ReferenceError: Console is not defined
at exports.messageTrigger.functions.firestore.document.onCreate (/srv/index.js:23:9)
at cloudFunction (/srv/node_modules/firebase-functions/lib/cloud-functions.js:131:23)
at /worker/worker.js:825:24
at
at process._tickDomainCallback (internal/process/next_tick.js:229:7)
the resolution is to low bro, it's little blur when i watch
only 360
Change your resolution below the video
Device token : null ?????
HELP!!!
Make sure your google services file is correct.
try all this thing, still not working
Same. have you find the solution?
Video quality to low why?
TH-cam may be still processing my video or you can try changing the video resolution in the video settings itself. I always upload my video in 1080p or 4K resolution.
Q. Did you solve the notification twice?
I would want to have a Carousel/Swiper/Row that elements( images / icons ) follow path of curve ( Arc ), I want to scroll the elements in curve path not in straight path , Please share if u have any idea . you can check the example in link below ( flutter) :
github.com/walmartlabs/curved-carousel
You can use the Animation Class.
Try this tutorial
th-cam.com/video/Jig1XRFr7Xw/w-d-xo.html
What Debugging Cloud Functions man? :(
Please watch the complete video. Thanks
Thank You very much it was very helpful.
Glad to hear that. You are welcome