⚠ Update : The payload was not working in terminated state i have fixed it , you need to use this function i have missed that in the video . add this after the handling foreground messages. // for handling in terminated state final RemoteMessage? message = await FirebaseMessaging.instance.getInitialMessage(); if (message != null) { print("Launched from terminated state"); //can change the waiting time depending on you app Future.delayed(Duration(seconds: 1), () { navigatorKey.currentState!.pushNamed("/message", arguments: message); }); } also updated the github repository.
@vrindtime5 ай бұрын
i think you should pin this
@karlkiyotaka10 ай бұрын
Thank you so much bro, You saved my job and my life as well 🔥🔥🔥🔥🔥🔥
@jsenthil150810 ай бұрын
Such a wonderful tutorial with clear and detailed explanation. Thanks. Keep posting such videos.
@Snehasis432110 ай бұрын
Thank you
@jaysinhchauhan56885 ай бұрын
Thanks buddy... must Recommeded video for push notification
@mmathems3957 ай бұрын
Many thanks for this tutorial. This was very helpful 😊
@acornerofherheart-jr9pl5 ай бұрын
thanks a lot sir it's very nicely explained and also working.... helpful for me
@rudramistry36798 ай бұрын
THIS VIDEO IS REALLY VERY HELPFUL.....
@user-hr6gh9us4s8 ай бұрын
Thanks from Japan. Your Video is very useful to me. Thank You Very Much! sorry, my english is poor
@increasedw4 ай бұрын
Thanks. Worked for me.
@ResultsFinale4 ай бұрын
Thank u for this tutorial. my question : while navigatorKey.currentContext is Always Null
@pramodvishwakarma098 ай бұрын
Thanks from INDORE . Your Video is very useful to me. Thank You Very Much! 💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌
@sncodext3 ай бұрын
in terminated state , the navigation is not working for schedule notification
@aysarhijazi12297 ай бұрын
thank you perfect work
@sncodext4 ай бұрын
i want to send schedule notification on specific device token using code , what will be the implemenation ???
@MTSightseeing4 ай бұрын
Hey, when I run the project I am getting an unsupported error: reconfigure your firebase cli and I am choosing option 2: chrome . Please help me please
@Snehasis43214 ай бұрын
Use `dart pub global activate flutterfire_cli` `flutterfire configure --project={your project id}` command to configure using firebase cli again and make sure web platform is selected.
@MTSightseeing4 ай бұрын
@@Snehasis4321 how to check web platform Is selected
@Snehasis43214 ай бұрын
if (kIsWeb){} use kIsWeb it is an inbuilt variable import from 'package:flutter/foundation.dart' , can be used to check if the platform is web or not. I am making a dedicated video regarding pushing notification on flutter web will be published soon.
@arnabkarmakar92927 ай бұрын
I got two consecutive push notifications while my app is in background. kindly guide why this is happening.
@GajendranMegajolla7 ай бұрын
thanks for video how to send title,body to local notifications
@1MinuteShortVideos2 ай бұрын
Please make video on How to play .MP3 file sound
@rafaymushtaq231610 ай бұрын
Sir, can you make the tutorial on How to save fcm token in database and most important thing how we trigger automatic notification for example admin add some products it automatically push notification to user about adding product ❤
@Snehasis432110 ай бұрын
Ok I will do it
@rafaymushtaq231610 ай бұрын
@@Snehasis4321 I will wait for it. Plz try to make tutorial soon. It's my humble request😥.
@soumyadippanja53848 ай бұрын
sir when my app is on active tapping on notification redirecting to the particular page. But when my app is on background and kill i'm receiving notifications but tapping on notifications won't opening my app. and i cant getting any logs.
@Snehasis43218 ай бұрын
I have fixed this issue please check the latest source code.
@adeeshaperera532010 ай бұрын
Is this working for terminated state of app.? I need to send notifications to all the app users in weekdays only even the app is closed. Can we do that ?
@Snehasis432110 ай бұрын
Yes it will work.
@haiderjaafer816410 ай бұрын
Great work... How to show notifications count numbers of incoming notifications in app icon like what'sup, Facebook, Instagram...
@Snehasis432110 ай бұрын
Count can be stored in a counter variable and can be access using provider or something else as you want. To make it like what app, Facebook we need to also customize the notification as per our need .
@haiderjaafer816410 ай бұрын
@@Snehasis4321 So can you make in a tutorial
@Snehasis432110 ай бұрын
@@haiderjaafer8164 ok bro i will make a tutorial.
@haiderjaafer816410 ай бұрын
@@Snehasis4321 Thank a lot
@padmalochanamohanta35968 ай бұрын
Sir how to add action button in push notification
@AbdulGani-eg2pu10 ай бұрын
how to automate the push notification based on changes of documents/collection in firebase firestore? post a cideo if you knwo about this?thanks in advance
@Snehasis432110 ай бұрын
Ok I will do it.
@purushottampk453011 ай бұрын
It work when required authentication before message screen?
@Snehasis432111 ай бұрын
I have not used any authentication, but if you want you can add authentication to you app.
@templetonmeshack28167 ай бұрын
Hello, do you know how to implement the FCM v1 instead of the legacy? Some information on the google documentation is not clear for me, may you please assist me on that?
@deepaksp36154 ай бұрын
did u implement FCM v1.
@oussamasbisiane454410 ай бұрын
when i tried the test i don't received the notification ?
@Snehasis432110 ай бұрын
It takes some time for notification to arrive, as shown in the video you can test with firebase token first then it come instantly , then create a new campaign and test.
@oussamasbisiane454410 ай бұрын
it works now thank u for tuto and thank u for replaying@@Snehasis4321
@farzane_gharib9 ай бұрын
Hi.Im using firebase messaging in my flutter app. Why do I get this error: "Error: AbortError: Failed to execute 'subscribe' on 'PushManager': Subscription failed - no active Service Worker " when I run my Flutter app for the first time on Chrome browser, but if I restart the app or refresh the browser page, the error disappears? and how should i solve that?
@Snehasis43219 ай бұрын
i think you might have not initialize the the firebase properly , initialize in the main function. try this void main() { WidgetsFlutterBinding.ensureInitialized(); // Initialize the PushManager FirebaseMessaging.instance.initialize(); // Run your app runApp(MyApp()); } if this does not solve the issue you can ask me.
Hi, routing in specific page while tap on notification isn't working while app is terminated. I've done my code following all the steps that you showed here. Would please tell me reason. I think navogatorkey getting null while app is terminated that's why routing isn't working while app is terminated. BTW, nice tutorial.
@Snehasis43217 ай бұрын
While making this video I only did it for background and foreground. I will ask to have a look at the source code in GitHub I have added the logic to handle the notification in terminated state.
@mahbubpasha61767 ай бұрын
@@Snehasis4321 I've follow these code for terminate state but routing not working while app is opened by tapping on notification in terminate state
@deepaksp36155 ай бұрын
@@mahbubpasha6176 did the problem got solved. i am also stuck there
@INNOVATIONSTUDIO6 ай бұрын
best
@pramodvishwakarma098 ай бұрын
terminated state notificaton not recived
@Snehasis43218 ай бұрын
when i made this video i didn't add the code for terminated state state , but you can check the source code i have add the terminated state code ,please cooperate with that.
@shubhammankar604710 ай бұрын
Why you use vs code instead of android studio, and whats your machine’s configuration
@Snehasis432110 ай бұрын
Vscode is more lightweight and I know all the shortcuts of it , it helps me code faster.
@shubhammankar604710 ай бұрын
@@Snehasis4321 okayyy .. how much ram does your machine have, and also you have earned a subscriber ;)
@Snehasis432110 ай бұрын
@@shubhammankar6047 8gb ram bro
@charlieduke162711 ай бұрын
[ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: Unsupported operation: DefaultFirebaseOptions have not been configured for windows - you can reconfigure this by running the FlutterFire CLI again. I got this error anfter running the app. I use windows by the way.
@Snehasis432111 ай бұрын
As the error says that you have not configure your firebase project for windows. Just configure it for windows also by running this command - flutterfire configure --project= and make sure to select windows as the platform.