No video

Mastering Push Notifications in Flutter: Firebase Integration Guide

  Рет қаралды 24,991

Snehasis Ghosh

Snehasis Ghosh

Күн бұрын

Пікірлер: 61
@Snehasis4321
@Snehasis4321 10 ай бұрын
⚠ 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.
@vrindtime
@vrindtime 5 ай бұрын
i think you should pin this
@karlkiyotaka
@karlkiyotaka 10 ай бұрын
Thank you so much bro, You saved my job and my life as well 🔥🔥🔥🔥🔥🔥
@jsenthil1508
@jsenthil1508 10 ай бұрын
Such a wonderful tutorial with clear and detailed explanation. Thanks. Keep posting such videos.
@Snehasis4321
@Snehasis4321 10 ай бұрын
Thank you
@jaysinhchauhan5688
@jaysinhchauhan5688 5 ай бұрын
Thanks buddy... must Recommeded video for push notification
@mmathems395
@mmathems395 7 ай бұрын
Many thanks for this tutorial. This was very helpful 😊
@acornerofherheart-jr9pl
@acornerofherheart-jr9pl 5 ай бұрын
thanks a lot sir it's very nicely explained and also working.... helpful for me
@rudramistry3679
@rudramistry3679 8 ай бұрын
THIS VIDEO IS REALLY VERY HELPFUL.....
@user-hr6gh9us4s
@user-hr6gh9us4s 8 ай бұрын
Thanks from Japan. Your Video is very useful to me. Thank You Very Much! sorry, my english is poor
@increasedw
@increasedw 4 ай бұрын
Thanks. Worked for me.
@ResultsFinale
@ResultsFinale 4 ай бұрын
Thank u for this tutorial. my question : while navigatorKey.currentContext is Always Null
@pramodvishwakarma09
@pramodvishwakarma09 8 ай бұрын
Thanks from INDORE . Your Video is very useful to me. Thank You Very Much! 💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌💌
@sncodext
@sncodext 3 ай бұрын
in terminated state , the navigation is not working for schedule notification
@aysarhijazi1229
@aysarhijazi1229 7 ай бұрын
thank you perfect work
@sncodext
@sncodext 4 ай бұрын
i want to send schedule notification on specific device token using code , what will be the implemenation ???
@MTSightseeing
@MTSightseeing 4 ай бұрын
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
@Snehasis4321
@Snehasis4321 4 ай бұрын
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.
@MTSightseeing
@MTSightseeing 4 ай бұрын
@@Snehasis4321 how to check web platform Is selected
@Snehasis4321
@Snehasis4321 4 ай бұрын
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.
@arnabkarmakar9292
@arnabkarmakar9292 7 ай бұрын
I got two consecutive push notifications while my app is in background. kindly guide why this is happening.
@GajendranMegajolla
@GajendranMegajolla 7 ай бұрын
thanks for video how to send title,body to local notifications
@1MinuteShortVideos
@1MinuteShortVideos 2 ай бұрын
Please make video on How to play .MP3 file sound
@rafaymushtaq2316
@rafaymushtaq2316 10 ай бұрын
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 ❤
@Snehasis4321
@Snehasis4321 10 ай бұрын
Ok I will do it
@rafaymushtaq2316
@rafaymushtaq2316 10 ай бұрын
@@Snehasis4321 I will wait for it. Plz try to make tutorial soon. It's my humble request😥.
@soumyadippanja5384
@soumyadippanja5384 8 ай бұрын
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.
@Snehasis4321
@Snehasis4321 8 ай бұрын
I have fixed this issue please check the latest source code.
@adeeshaperera5320
@adeeshaperera5320 10 ай бұрын
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 ?
@Snehasis4321
@Snehasis4321 10 ай бұрын
Yes it will work.
@haiderjaafer8164
@haiderjaafer8164 10 ай бұрын
Great work... How to show notifications count numbers of incoming notifications in app icon like what'sup, Facebook, Instagram...
@Snehasis4321
@Snehasis4321 10 ай бұрын
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 .
@haiderjaafer8164
@haiderjaafer8164 10 ай бұрын
@@Snehasis4321 So can you make in a tutorial
@Snehasis4321
@Snehasis4321 10 ай бұрын
@@haiderjaafer8164 ok bro i will make a tutorial.
@haiderjaafer8164
@haiderjaafer8164 10 ай бұрын
@@Snehasis4321 Thank a lot
@padmalochanamohanta3596
@padmalochanamohanta3596 8 ай бұрын
Sir how to add action button in push notification
@AbdulGani-eg2pu
@AbdulGani-eg2pu 10 ай бұрын
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
@Snehasis4321
@Snehasis4321 10 ай бұрын
Ok I will do it.
@purushottampk4530
@purushottampk4530 11 ай бұрын
It work when required authentication before message screen?
@Snehasis4321
@Snehasis4321 11 ай бұрын
I have not used any authentication, but if you want you can add authentication to you app.
@templetonmeshack2816
@templetonmeshack2816 7 ай бұрын
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?
@deepaksp3615
@deepaksp3615 4 ай бұрын
did u implement FCM v1.
@oussamasbisiane4544
@oussamasbisiane4544 10 ай бұрын
when i tried the test i don't received the notification ?
@Snehasis4321
@Snehasis4321 10 ай бұрын
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.
@oussamasbisiane4544
@oussamasbisiane4544 10 ай бұрын
it works now thank u for tuto and thank u for replaying@@Snehasis4321
@farzane_gharib
@farzane_gharib 9 ай бұрын
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?
@Snehasis4321
@Snehasis4321 9 ай бұрын
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.
@farzane_gharib
@farzane_gharib 9 ай бұрын
​@@Snehasis4321 In fact, I have already done that. void main()async{ WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); FirebaseMessaging firebaseMessaging =FirebaseMessaging.instance; NotificationSettings settings = await firebaseMessaging.requestPermission( alert: true, announcement: false, badge: true, carPlay: false, criticalAlert: false, provisional: false, sound: true); final fcmToken = await firebaseMessaging.getToken(vapidKey:"***"); }
@mahbubpasha6176
@mahbubpasha6176 7 ай бұрын
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.
@Snehasis4321
@Snehasis4321 7 ай бұрын
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.
@mahbubpasha6176
@mahbubpasha6176 7 ай бұрын
@@Snehasis4321 I've follow these code for terminate state but routing not working while app is opened by tapping on notification in terminate state
@deepaksp3615
@deepaksp3615 5 ай бұрын
@@mahbubpasha6176 did the problem got solved. i am also stuck there
@INNOVATIONSTUDIO
@INNOVATIONSTUDIO 6 ай бұрын
best
@pramodvishwakarma09
@pramodvishwakarma09 8 ай бұрын
terminated state notificaton not recived
@Snehasis4321
@Snehasis4321 8 ай бұрын
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.
@shubhammankar6047
@shubhammankar6047 10 ай бұрын
Why you use vs code instead of android studio, and whats your machine’s configuration
@Snehasis4321
@Snehasis4321 10 ай бұрын
Vscode is more lightweight and I know all the shortcuts of it , it helps me code faster.
@shubhammankar6047
@shubhammankar6047 10 ай бұрын
@@Snehasis4321 okayyy .. how much ram does your machine have, and also you have earned a subscriber ;)
@Snehasis4321
@Snehasis4321 10 ай бұрын
@@shubhammankar6047 8gb ram bro
@charlieduke1627
@charlieduke1627 11 ай бұрын
[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.
@Snehasis4321
@Snehasis4321 11 ай бұрын
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.
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 49 МЛН
Zombie Boy Saved My Life 💚
00:29
Alan Chikin Chow
Рет қаралды 27 МЛН
Люблю детей 💕💕💕🥰 #aminkavitaminka #aminokka #miminka #дети
00:24
Аминка Витаминка
Рет қаралды 374 М.
Yum 😋 cotton candy 🍭
00:18
Nadir Show
Рет қаралды 7 МЛН
Smart Push Notifications with Flutter & FCM
11:10
Fireship
Рет қаралды 216 М.
Flutter Firebase Push Notifications Tutorial | 2024
53:20
Snehasis Ghosh
Рет қаралды 14 М.
DHH discusses SQLite (and Stoicism)
54:00
Aaron Francis
Рет қаралды 59 М.
📱Android Push Notifications • Flutter x Firebase Tutorial
12:39
OneSignal Notifications in Flutter Made Easy | Step-by-Step Tutorial
11:11
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 49 МЛН