Part-4 Flutter Show Notification When app is in Foreground Background Or Terminated State

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • In this lecture i will teach you how to display notifications for android and iOS when app is in foreground, background or in terminated states.
    If you want to support my free work.
    Easy paisa, Jazz cash and Sad Pay account
    03078986011
    Tiktok: / axiftaj
    Instagram: / thetechbrotherss
    Join fb group: lnkd.in/dAWaFWtp
    _____________/Connect On Social Media\____________
    ► linkedin:➜ / axiftaj
    ► Instagram:➜ / axif_taj
    ► Facebook:➜ / aaxiftaj
    ► Twitter:➜ / axiftaj
    ► GitHub:➜ github.com/axiftaj
    ► Hire me on Fiver:➜ www.fiverr.com/asif_taj
    =========================================
    Flutter Boot camp 2022: lnkd.in/dVv_jy4W
    Flutter Roadmap: lnkd.in/dHF8yc68
    Flutter firebase tutorials: lnkd.in/dfwijFgd
    Flutter APIS Tutorials Playlist: lnkd.in/dQEe7ZBc
    Flutter Provider Tutorials Playlist: lnkd.in/dv6xGRCQ
    Flutter widget of the week source code: lnkd.in/dxuUu3Ww
    Flutter Google Map Tutorials playlist:
    Dart Playlist:
    for business query write me at:
    axiftaj@gmail.com
    flutter, firebase, notifications, ios, android, firebase notifications flutter, hindi, ios
    00:00 Demo
    00:05 Introduction What we will do in this lecture
    02:50 Fetch Notification When App is Active
    06:30 Initialise local notification plugin
    12:00 Show Notification when App is active
    19:30 Testing Notifications
    21:00 Show Notification when app is in background or Terminated
    27:00 Fixing Mistake background notification
    28:50 Testing Terminated states
    29:00 What is Notification Channels
    #getx #flutter #firebase #android #tutorials
  • Věda a technologie

Komentáře • 243

  • @thetechbrotherss
    @thetechbrotherss  Před rokem +12

    Lot of students are saying i forgot to call the initLocalNotifications() functions, please call this in like this.
    call void firebaseInit(BuildContext context) {
    FirebaseMessaging.onMessage.listen((message) {
    if (Platform.isAndroid) {
    initLocalNotifications(context, message);
    showNotification(message);
    }
    });
    }
    Someone also said i didn't call firebase init function please call this in your init state of home screen.
    I did call this but i think in video editing it trimmed out.
    Meta data:

    • @hamzabhatti2461
      @hamzabhatti2461 Před rokem

      Thankyou Sir

    • @FusionFinds1
      @FusionFinds1 Před rokem

      github link plese bai

    • @mhaseebliaqat3157
      @mhaseebliaqat3157 Před 11 měsíci

      If we make firebaseinit(buildcontext context) then how should we call it from home?

    • @mhaseebliaqat3157
      @mhaseebliaqat3157 Před 11 měsíci +1

      Removing buildcontext from initLocalNotification and calling from firebaseinit like initLocalNotification (message) worked for me :) thanks

    • @bilalahmad-uj7mb
      @bilalahmad-uj7mb Před 4 měsíci

      thank you brother it's also work for me@@mhaseebliaqat3157

  • @mohitsaini6642
    @mohitsaini6642 Před rokem +6

    the only reason youtube run because of your like youtubers sir . I got the content which i want . I really appreciate your efforts in make such videos. Thanks again

  • @alisidhu-qo4fd
    @alisidhu-qo4fd Před 7 měsíci

    Thanks Brother it is good video. facing difficult issues but resolve it .

  • @user-ic7bc4ft9b
    @user-ic7bc4ft9b Před 8 měsíci

    Sir, Thank you for the video.🥰

  • @sudansunar4391
    @sudansunar4391 Před rokem +2

    brother today is the interview of mine in internship from the remote . it is my first internship in my life am very exicted brother really i will give you my result after 6 pm

    • @thetechbrotherss
      @thetechbrotherss  Před rokem +1

      Good luck share in my fb group codewithasif

    • @sudansunar4391
      @sudansunar4391 Před rokem

      @@thetechbrotherss sure brother.

    • @demodemo9429
      @demodemo9429 Před rokem

      Bhai jada exited ok sab chiz ke liye ha mat boldena company wale achi marti i interns ki 😂😂😂

  • @huseyinasan
    @huseyinasan Před 6 měsíci

    Thx bro, I was struggling 3 days with that pop up while the app is in terminated state. Now I learned it was about channel_id.

  • @mahmoudlotfy7291
    @mahmoudlotfy7291 Před 8 měsíci +2

    I did exactly what you do but when I closed my app , the notification only showed in the status bar and the mgs didn't show at the top of the screen., The problem in (27:00 m) in video.

  • @samratbiswas7010
    @samratbiswas7010 Před 3 dny

    Very helpful video thx vai ❤❤❤❤

  • @jingyipua773
    @jingyipua773 Před 11 měsíci

    Sir, Thank you for the video. I have question regards the floating notification. How to set the floating notification display on phone homepage and when open other app?
    I had followed your teaching video and pinned comment. But the floating notification only be displayed during in the developed app.

    • @thetechbrotherss
      @thetechbrotherss  Před 11 měsíci +1

      It's from system setting, it's constant

    • @jingyipua773
      @jingyipua773 Před 11 měsíci

      @@thetechbrotherss thank you, I had found the app settings and solved it.

  • @RayanIhasan
    @RayanIhasan Před 6 měsíci

    Thanks for this video

  • @CuteAngle-v1m
    @CuteAngle-v1m Před 2 měsíci

    Very vary usefully video sir👌

  • @ZeeshanAli-rz6zp
    @ZeeshanAli-rz6zp Před 2 měsíci

    Hi @The Tech Brother.
    I need your help bcz im facing an issue that is like, in terminated state, when i click on a notification, it navigates me to a specific screen, which is working perfectly, but im
    also calling some REST Apis on the splash screen and when Apis calls done, my App takes me back to the home screen, but i was already navigate to a specific screen when i clicked on notification popup and dont want to move back to home screen at that time.
    Any idea how i can solve the issue. THANKS IN ADVANCE

    • @thetechbrotherss
      @thetechbrotherss  Před 2 měsíci

      Bro it's your logic, you have to came up with some logic code to get it done
      i will suggest you to use code on home screen

  • @user-cn5yu4dm9p
    @user-cn5yu4dm9p Před rokem

    I have a question, since I'm using my backend db, how should i make it to popup on background/terminated?

    • @thetechbrotherss
      @thetechbrotherss  Před rokem

      Backend is a different side, if you want to show notifications you have to do it like this

    • @preetvasoya
      @preetvasoya Před 3 měsíci

      How did you solve the pop up issue when app is killed
      Did you send channel id from backend?

  • @dhruvnakum6381
    @dhruvnakum6381 Před rokem

    Hi brother, I have a chat application and facing one issue.
    User A is online and sends 4-6 messages to User B who is offline.
    Currently when user B gets online he only receives the last chat message notification. I want to show all the notification of that user. How can I do that, I have gone through Firebase docs and all but didn't found any solution.
    Thanks in advance

  • @wasimsafdarhumma5515
    @wasimsafdarhumma5515 Před 23 dny

    The notification popup is not showing when the app is in the background. I am using the Flutter emulator read all the comments and tried everything. I also copied code from Github but it is still not showing. I received the notification but the popup did not show. Any help?

    • @thetechbrotherss
      @thetechbrotherss  Před 23 dny +1

      Check system settings, it also depends on phone settings

  • @hashWorld-0
    @hashWorld-0 Před 2 měsíci

    kiya yeh pragma notification wali line hum main me likh skty hai?

  • @mrtaimoorsikander
    @mrtaimoorsikander Před rokem

    Wonderful dear. I have everything setup and working on Android but same code is not working for iOS? I do get popup for notification permission and also get ID but nothing comesup when I send message

    • @thetechbrotherss
      @thetechbrotherss  Před rokem

      I have explain this why it's not working on ios because you don't have setup connect with APNs server

  • @zeehydr
    @zeehydr Před rokem

    Assalam-O-Allaikum, hope Sir you are doing well, Sir can we display local notifications in full screen, when a new FCM message is received. If possible please guide me it is important because I am stuck with this problem in FYP Project.

    • @thetechbrotherss
      @thetechbrotherss  Před rokem

      if app is active you can use dialog alert, or stack or bottom sheets etc

  • @sushanttare8586
    @sushanttare8586 Před 8 měsíci

    How to contact you, sir? I have a doubt regarding my project for this same notification topic.

  • @WickyMalik
    @WickyMalik Před 11 měsíci +1

    After adding @pramga('vm:entry-point') in console
    FlutterFirebaseMessagingBackgroundService started!
    is showing but i am not recieving notification when app is killed

    • @thetechbrotherss
      @thetechbrotherss  Před 11 měsíci

      Uninstalled the app and installed it again

    • @SyedAbdulMannan-wh3vr
      @SyedAbdulMannan-wh3vr Před 5 měsíci

      @@thetechbrotherss sir i still not getting the notification after termineting the app. And also i uninstalled my application. But i am getting my notification in background

    • @rimshawazir7774
      @rimshawazir7774 Před 3 měsíci

      @@SyedAbdulMannan-wh3vr use onDidReceiveNotificationResponse instead of onDidReceiveBackgroundNotificationResponse it will show the pop up when the app is kill

    • @HamdiFa
      @HamdiFa Před 3 měsíci

      @@SyedAbdulMannan-wh3vr void firebaseInit(BuildContext context) {
      FirebaseMessaging.onMessage.listen((message) {
      if (Platform.isAndroid) {
      initLocalNotifications(context, message);
      showNotification(message);
      }
      });
      }

    • @HamdiFa
      @HamdiFa Před 3 měsíci

      @@SyedAbdulMannan-wh3vr initLocalNotfication needs to be called in the listener I believe it was trimmed out in the video.

  • @vinitrathod2303
    @vinitrathod2303 Před 8 měsíci

    i have a question when my app is killed and after i wnt to redirect some one page to click with notification please help me to solve my problem

  • @muhammadarslan5227
    @muhammadarslan5227 Před rokem

    asif bhai main notification k sath image url b pass kr rha hn notification main image b show krwa rha hn lekin image notification main srf tb show hoti hai jb app running state main hoti jese hi background ya terminate krta hn to notification main srf title or body show krta hai image nhi krta. terminate state main image ko kese manage kron?

  • @muhammadali4653
    @muhammadali4653 Před 11 měsíci

    Should I see pop-up notification when i kill or background the app, please do answer!, I'm receiving pop-up notifications but only when the app is active otherwise when the app is in background or killed I don't receive pop-up notifications just simple notifications.
    If anyone knows, Please do answer!!!

    • @thetechbrotherss
      @thetechbrotherss  Před 11 měsíci +1

      Send notification priority hight to get the popup

    • @Vk-bw9cv
      @Vk-bw9cv Před 10 měsíci +1

      If anybody is trying to find this option then to know you, the priority option is under development by the Firebase team that's why it is not available.

  • @astronomerabdurrehman6954

    Hey, could you specify where did you call the initLocalNotifications method?

    • @thetechbrotherss
      @thetechbrotherss  Před rokem

      Follow the playlist from start part-1 everything is done

    • @dhruvsinghkushwah5919
      @dhruvsinghkushwah5919 Před rokem

      He didn't, or maybe we missed it because I did too...just call it in the firbaseINIT method before the showNotification method.

    • @shreyanshsohane5077
      @shreyanshsohane5077 Před rokem

      ​@@dhruvsinghkushwah5919 what to pass as context

    • @dhruvsinghkushwah5919
      @dhruvsinghkushwah5919 Před rokem

      @@shreyanshsohane5077 pass the build context object…not just in this method but you also need to add that in the method you’re calling. Because those init methods are being called in our main.dart file where the build context is available and then once we have it in one of our methods we can pass it around

  • @hassanrana998
    @hassanrana998 Před 2 měsíci

    no valid “aps-environment” entitlement string found for application getting this error and not receiving on ios simulator

    • @thetechbrotherss
      @thetechbrotherss  Před 2 měsíci

      This error has nothing to do with notifications, check your environment variables

  • @user-db7tv8jd3f
    @user-db7tv8jd3f Před 11 měsíci +1

    Please make a separate playlist of Flutter Awesome Notifications with Big Picture ( IOS & Android). I can’t receive a big picture image in iOS devices

  • @user-su8px6nk7o
    @user-su8px6nk7o Před 5 měsíci

    in some devices the local notification does't pop ups at the top bar but in some devices it does pops up ? i sit device specific or what? can you please healp?

    • @thetechbrotherss
      @thetechbrotherss  Před 5 měsíci

      It is not supposed to be, but it do work on based on OS

  • @farazmughal8505
    @farazmughal8505 Před 3 měsíci

    foreground and background me a raha hai notification but kill state me nahi a raha, kya issue ho sakta hai?

    • @thetechbrotherss
      @thetechbrotherss  Před 3 měsíci

      Kill state k liye make sure static function main.dar file ma call kia ho, jo mainy video ma btaya ha

  • @md.abdullahal-baky9955

    I am facing this error when app in background: Notification Channel requested (1) has not been created by the app. Manifest configuration, or default, value will be used.
    what should I do?

    • @thetechbrotherss
      @thetechbrotherss  Před rokem

      No problem, add this in manifest file or ignore it it won't create issue if you send the channel in noitification

    • @preetvasoya
      @preetvasoya Před 3 měsíci

      ​@@thetechbrotherssbut the pop up is not showing

    • @bhavyamalik8422
      @bhavyamalik8422 Před měsícem

      @@preetvasoya how did you solve it

  • @user-pf9bb6gl4v
    @user-pf9bb6gl4v Před 9 měsíci

    Sir I write code step by step but I did not received notification in foreground and background
    Error:
    D/FLTFireMsgReceiver(22916): broadcast received for message
    E/flutter (22916): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:flutter_local_notifications/src/platform_flutter_local_notifications.dart': Failed assertion: line 1018 pos 12: 'callback != null': The backgroundHandler needs to be either a static function or a top
    E/flutter (22916): level function to be accessible as a Flutter entry point.
    E/flutter (22916): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
    E/flutter (22916): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)

    • @thetechbrotherss
      @thetechbrotherss  Před 9 měsíci

      Please follow video carefully, also restart the project

    • @user-pf9bb6gl4v
      @user-pf9bb6gl4v Před 9 měsíci

      @@thetechbrotherss Sir now I copy the code from your github, now foreground notifications shows but background and when app is terminated No notifications recieved

    • @rimshawazir7774
      @rimshawazir7774 Před 3 měsíci

      here is the soloution //If App in Foreground
      Future showNotification(RemoteMessage message) async {
      if (message.notification != null) {
      AndroidNotificationChannel channel = AndroidNotificationChannel(
      Random.secure().nextInt(10000).toString(), "high_importance_channel",
      importance: Importance.max);
      AndroidNotificationDetails androidNotificationDetails =
      AndroidNotificationDetails(
      "high_importance_channel", channel.name.toString(),
      channelDescription: "your channel Discription",
      ticker: "ticker",
      icon: '@mipmap/ic_launcher',
      importance: Importance.high,
      priority: Priority.high);
      DarwinNotificationDetails darwinNotificationDetails =
      const DarwinNotificationDetails(
      presentAlert: true,
      presentBadge: true,
      presentBanner: true,
      );
      NotificationDetails notificationDetails = NotificationDetails(
      android: androidNotificationDetails, iOS: darwinNotificationDetails);
      Future.delayed(Duration.zero, () {
      _flutterLocalNotificationsPlugin.show(
      1,
      message.notification!.title.toString(),
      message.notification!.body.toString(),
      notificationDetails);
      });
      }
      }

  • @FlutterBaba
    @FlutterBaba Před rokem

    Great

  • @hashWorld-0
    @hashWorld-0 Před 2 měsíci

    hlo tech brothers plz tell me how can i change the icon as u just said change it put small image in drawable plz do it

    • @thetechbrotherss
      @thetechbrotherss  Před 2 měsíci

      add image in drwawable and replace the path in mipmap

    • @hashWorld-0
      @hashWorld-0 Před 2 měsíci

      @@thetechbrotherss i tried but it doesnot show the colorful image my imag is small icon with blue color but it show the dark gray

  • @learnflutter4001
    @learnflutter4001 Před rokem

    bro can you please teach, implementing pagination in flutter using any api, like in my api i need to pass begin and end in order to get number of data at a time, but when i scroll more data should be loaded, how can i implement this

    • @thetechbrotherss
      @thetechbrotherss  Před rokem

      I’ll create the tutorials

    • @learnflutter4001
      @learnflutter4001 Před rokem

      @@thetechbrotherss yess pls

    • @user-cn5yu4dm9p
      @user-cn5yu4dm9p Před rokem

      I'm thinking about stuff like this at the moment. My thoughts are some kind of, load all data at once, and make 'end' dynamic with kind of lazyloading. Or to obtain data onscroll, but dunno if it will autoscroll to top, cause of kinda 'new request and new data'

  • @dhruvsinghkushwah5919

    for some people who are wondering why the notification doesn't show up when the app is killed...open the app from the app drawer again and kill it. And then try sending the notification. it worked for me.

    • @thetechbrotherss
      @thetechbrotherss  Před rokem

      For app is killed, make sure you have installed the app again from start after doing all the code work

    • @airinhaque
      @airinhaque Před rokem

      Thank you so much. It worked for me by uninstalling it and then again running it

  • @user-oz6eg9vp4d
    @user-oz6eg9vp4d Před 3 měsíci

    i was receiving notifications but when i added local notification messaignin funciton in my app am not able to get notifications why???

    • @thetechbrotherss
      @thetechbrotherss  Před 3 měsíci

      did you called the functions in init, if you are still getting the same error please checkout the code on my github and compare it

  • @shaad-nj1nz
    @shaad-nj1nz Před 24 dny

    what if i want to send notification all user present in app?

  • @nikhilkukreja8498
    @nikhilkukreja8498 Před 11 měsíci

    App Background mai hai but running mai hai notification receive nhi ho system tray mai uske liye kya car sakhe hai?

    • @thetechbrotherss
      @thetechbrotherss  Před 11 měsíci

      Please check the source code on my github, you must be doing something wrong. Also read first comment

  • @gyanupadhyay9473
    @gyanupadhyay9473 Před rokem

    Bro I have seen that in some Chinese phones like infinix the notification doesn't comes in kill state.

  • @user-ig8mg9zx3v
    @user-ig8mg9zx3v Před 5 měsíci

    In mine the notification only comes when the app in in background, nor in foreground and nor while app is killed , kindly solve it ..

  • @maazking9087
    @maazking9087 Před 11 měsíci +1

    I have followed each and every step, I am getting notifications on foreground, background and when the app has been killed, but cannot get popups when app is is background and killed, I have done the work twice but same problem.

    • @thetechbrotherss
      @thetechbrotherss  Před 11 měsíci +1

      I have explain this as well, make sure to set the prioirty hight and also send channels id

    • @abhishekreddy8953
      @abhishekreddy8953 Před 9 měsíci +1

      Hello brother, while creating the android notification channel, make sure you had changed the id from random to "high_importance_channel". hope it will help you.

    • @sandeshhamal6410
      @sandeshhamal6410 Před 5 měsíci

      can you explain it properly brother?@@abhishekreddy8953 it only works if I change the id from random to 1.toString() as the channel id is 1 but none other works

    • @rimshawazir7774
      @rimshawazir7774 Před 3 měsíci +1

      use onDidReceiveNotificationResponse instead of onDidReceiveBackgroundNotificationResponse it will show the pop up when the app is kill

  • @dragongamerz4685
    @dragongamerz4685 Před 7 měsíci

    in this tutorial i have face one issue . isme sir me jab fist time app run karta hu or usko close karne pe notifications nahi aati lekin jab me isko open karke firse terminate karta hu to vo fix ho jata he terminate hone pe fir notification dikha ta he mene iska bohat solution dhunda lekin nahi mila mene multipal time app uninstall karke firse install kari or test kiya lekin issue har bar same aata he so please if you have any solution please sir reply me

  • @user-nl9ed3lz6w
    @user-nl9ed3lz6w Před 6 měsíci

    Hi Dear, when app is killed then no notifications comes

    • @thetechbrotherss
      @thetechbrotherss  Před 6 měsíci +1

      please checkout my code in github, you must be doing something wrong

  • @slowed__reverbed
    @slowed__reverbed Před 11 měsíci

    Why is there no sound for the android notification in your tutorial?
    I am facing the same issue

  • @sagarrana6381
    @sagarrana6381 Před 4 měsíci

    Sir, I used the same code and followed the same steps but the notification is sent in the foreground, In the case of background and terminated, it's coming but not showing in the popup. Can you guide me to solve this problem? I'll check the video multiple times.

    • @thetechbrotherss
      @thetechbrotherss  Před 4 měsíci

      check your phone setting, also check my code on github.com/axiftaj may be you have missed something

  • @ahmedbaig8543
    @ahmedbaig8543 Před rokem

    Sir its not showing on the Mobile App but showing in the Console/Terminal of Android Studio the Error is :
    W/FirebaseMessaging(22501): Unable to log event: analytics library is missing
    W/FirebaseMessaging(22501): Unable to log event: analytics library is missing

  • @omarmaamoun9457
    @omarmaamoun9457 Před 6 měsíci

    there is way to send notification from api automatic when app is closed ?

    • @thetechbrotherss
      @thetechbrotherss  Před 6 měsíci

      from app we cannot send it use server scripting for this

    • @omarmaamoun9457
      @omarmaamoun9457 Před 6 měsíci

      what is server scriptiong@@thetechbrotherss

  • @khalidkhalid6856
    @khalidkhalid6856 Před 24 dny

    sir video is very blur .i have good internet connection .i am not understand what to do?

  • @romzanali9930
    @romzanali9930 Před rokem

    I want to make the notification visible on foreground until clicked. How can I do it?

  • @softwaredev266
    @softwaredev266 Před rokem

    initNotification(Build context, Remote message) ye apne kaha py call kia hai?

    • @thetechbrotherss
      @thetechbrotherss  Před rokem

      void firebaseInit(BuildContext context) {
      FirebaseMessaging.onMessage.listen((message) {
      if (Platform.isAndroid) {
      initLocalNotifications(context, message);
      showNotification(message);
      }
      });
      }
      Do it like this

    • @thetechbrotherss
      @thetechbrotherss  Před rokem

      please check first comment

  • @Sanahashmi5363
    @Sanahashmi5363 Před 5 měsíci

    Notification Channel requested (1) has not been created by the app. Manifest configuration, or default, value will be used.
    W/FirebaseMessaging(30817): Notification Channel set in AndroidManifest.xml has not been created by the app. Default value will be used.
    Aoa bro mere pass background mn popup show ni ho rha channel id firebase se send krne k bad bhi ye exception ha xml mn metadata bhi add ha plz guide me

    • @yadukrishnankp9809
      @yadukrishnankp9809 Před 5 měsíci

      did you find any solution for it, iam also stuck at this point

    • @Sanahashmi5363
      @Sanahashmi5363 Před 5 měsíci

      g us channel ko start mn subscribe krna hota ha
      Meta data:
      ye lines android.menifest file mn add kr len or app k staring screen mn localNotficationInit() function run krwa len
      Future localNotficationInit() async {
      final FlutterLocalNotificationsPlugin _notificationsPlugin =
      FlutterLocalNotificationsPlugin();
      print('localNotficationInit');
      const AndroidNotificationChannel channel = AndroidNotificationChannel(
      'high_importance_channel',
      'high_importance_channel',
      importance: Importance.max,
      );
      await _notificationsPlugin
      .resolvePlatformSpecificImplementation<
      AndroidFlutterLocalNotificationsPlugin>()
      ?.createNotificationChannel(channel);
      }
      @@yadukrishnankp9809

    • @thetechbrotherss
      @thetechbrotherss  Před 5 měsíci

      Please take code from my GitHub

    • @preetvasoya
      @preetvasoya Před 3 měsíci

      ​@@yadukrishnankp9809same did you find solution?

  • @abbasali8540
    @abbasali8540 Před rokem

    showing error : Notification Channel set in AndroidManifest.xml has not been created by the app. Default value will be used.

  • @user-cj8wx5kc3l
    @user-cj8wx5kc3l Před 8 měsíci

    Mane try kiya 1 rakh ke but popup not showing. can you please help me?

  • @vivekprasad2703
    @vivekprasad2703 Před rokem

    bhai next video kab aayega. 4 days ho gaye

  • @vuralkayracetintas
    @vuralkayracetintas Před rokem

    why notifications go to some devices not to others ? ( especially android)

    • @thetechbrotherss
      @thetechbrotherss  Před rokem

      Please share more details about your issue

    • @vuralkayracetintas
      @vuralkayracetintas Před rokem

      @@thetechbrotherss While testing the notifications, the device I tested was receiving notifications. But after I took the build and uploaded it to the appstore and google play, when I sent a notification from the firebase, the device in my hand did not receive the notification, but it went to different devices.

  • @krishnabhattacharya-pd7nl

    Sir ....
    What should i learn?
    1) first flutter, firebase and after that node js
    Or,
    2) flutter and firebase after that native Android ?

  • @fantusgamerz2519
    @fantusgamerz2519 Před rokem

    initLocalNotifications kaha call kia ho bhai , func call krna bhul gye ho kaha call kruu plzz bata to brooo

    • @thetechbrotherss
      @thetechbrotherss  Před rokem +1

      isko init friebase fucntion ma jahan par app active ho to notifications receive hota ha

  • @Arjuns_World
    @Arjuns_World Před rokem

    The backgroundHandler needs to be either a static function or a top error

  • @richardchan8900
    @richardchan8900 Před rokem

    The background notification is ok, but the terminated app notification is not able to be received.

    • @thetechbrotherss
      @thetechbrotherss  Před rokem

      Please follow video carefully, also make sure to add the channel id

    • @richardchan8900
      @richardchan8900 Před rokem

      @@thetechbrotherss the channel id: Random.secure().nextInt can't be cast to string, please help!

    • @shakshorsarker3418
      @shakshorsarker3418 Před rokem

      I faced same problem..Flutter Firebase Messageing does not support debugging, that's why the notification is not working in terminated mode.

    • @preetvasoya
      @preetvasoya Před 3 měsíci

      did you find the solution ? how to do?

    • @bhavyamalik8422
      @bhavyamalik8422 Před měsícem

      @@preetvasoya soltuion?

  • @samiyi6885
    @samiyi6885 Před rokem

    Bhai jab notification click karte he tab screen to aa raha he bad me turant redirect ho jata he mere main dashboard par.

    • @thetechbrotherss
      @thetechbrotherss  Před rokem

      By default home screen par jata ha, next lectures ma i told how to redirect it to specific screens.

    • @samiyi6885
      @samiyi6885 Před rokem

      @@thetechbrotherss please share that next video link.

  • @Disciplinestudent-eb2ix
    @Disciplinestudent-eb2ix Před 11 měsíci

    I did not get pop meessage even I add id in channel in firebase

    • @thetechbrotherss
      @thetechbrotherss  Před 11 měsíci

      read first comment

    • @Disciplinestudent-eb2ix
      @Disciplinestudent-eb2ix Před 11 měsíci +2

      @@thetechbrotherss I already Implement those line but I didn't give pop message when My app app was background and terminated
      plz Give Me Solution 🙏🙏🙏🙏🙏

    • @preetvasoya
      @preetvasoya Před 3 měsíci

      pop up is not showing did anyone solve it ? how?

  • @maazafridi2090
    @maazafridi2090 Před 11 měsíci

    sorry but... ap nay siraf code kiya hai ap tu apnay sath hi lagay hain... ye nai bta rahay k iss line ka mtlb kia is ka kia etc.

    • @thetechbrotherss
      @thetechbrotherss  Před 11 měsíci

      Bro follow from start, also go though my bootcamp for better understanding.

  • @rafaydeswali6197
    @rafaydeswali6197 Před měsícem

    sir app kill karna ka bad notifications to ara hain lakin notification upr show nhi ho rahi hai firebase main ja kar channel 1 bhi kar diya phi yahi ho rha hau

    • @thetechbrotherss
      @thetechbrotherss  Před měsícem

      check phone notifications setting

    • @rafaydeswali6197
      @rafaydeswali6197 Před měsícem

      @@thetechbrotherss on hai sir app ka andr notification show ho rhi hai app kill krna ka bad bhi upr to ati hai tune bhi ho rha hai lakin jaise snakbar ati hai wsa nhi ari

    • @rafaydeswali6197
      @rafaydeswali6197 Před 24 dny

      @@thetechbrotherss sie reply kar dain please

  • @aqibitverification3487
    @aqibitverification3487 Před 9 měsíci

    Bro Please make a advanced chat App with firebase

  • @ukashaanwar9451
    @ukashaanwar9451 Před rokem

    notification received lakin popup show ni ho rha jb ap background ma ho ya terminated ho channel id bhe pas ki ha
    W/FirebaseMessaging(16898): Notification Channel requested (1) has not been created by the app. Manifest configuration, or default, value will be used.
    W/FirebaseMessaging(16898): Notification Channel set in AndroidManifest.xml has not been created by the app. Default value will be used.

  • @user-gc1le7ko8z
    @user-gc1le7ko8z Před 8 měsíci

    Sir notification channel bhej rha hu tab bhi background me notification pop up nhi a rha

  • @HuzaifaTech10
    @HuzaifaTech10 Před rokem

    sir notification icon kas change hoga,

  • @shreyanshsohane5077
    @shreyanshsohane5077 Před rokem +1

    Many of you who are facing problem of not receiving notifications............remove parameter of 'buildcontext context' in 'initLocalNotification ' and call 'initLocalNotification(message)' in firebaseInit method before ' showNotification(message) ' line

  • @samiyi6885
    @samiyi6885 Před rokem

    Error aa raha he.
    Failed to handle method call karke.

    • @thetechbrotherss
      @thetechbrotherss  Před rokem

      please explain error a bit more in details

    • @rakshitvaja3066
      @rakshitvaja3066 Před rokem +3

      Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference, null, java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
      i'm getting same error
      have you got any solution for that??

    • @samiyi6885
      @samiyi6885 Před rokem +1

      @@rakshitvaja3066 bhai jo ek function he na notification service me usko call karo to ho jayega haja sab call kiya he function

    • @rakshitvaja3066
      @rakshitvaja3066 Před rokem +1

      @@samiyi6885 kon sa function kaha call karna hai??

    • @dhruvsinghkushwah5919
      @dhruvsinghkushwah5919 Před rokem +1

      @@rakshitvaja3066 call the initLocalNotifications method in firebaseInit() method just before you call the showNotification method. Since we're not calling the init method for local notifications, you're getting that error

  • @muhammadjavedrafique4592

    flutter ka pawaa aasif lawaaaa

  • @muhammadali4653
    @muhammadali4653 Před 4 měsíci

    EVERYONE WHO WILL WORK WITH PUSH NOTIFICATIONS WILL FACE THIS AT SOME TIME IN FUTURE.
    Notifications are also dependent upon the background thread which is also killed when there is device battery optimization involved, specially in app killed state.
    It's important to know this also as It can confuse a lot of people since in some phones notifications work perfectly and in others it don't and also this is one of the reasons why sometimes notifications stops working.

    • @thetechbrotherss
      @thetechbrotherss  Před 4 měsíci

      Sometimes these are manipulated by systems setting 🥲

  • @mdzunaed7414
    @mdzunaed7414 Před 11 měsíci +1

    work to kar geya, lekin kuch samjha nehi🤣🤣

    • @thetechbrotherss
      @thetechbrotherss  Před 11 měsíci

      Yar itna details ma explain kia tha bhai, you mist learn basic of flutter

    • @mdzunaed7414
      @mdzunaed7414 Před 11 měsíci

      @@thetechbrotherss nehi vai, apse bohot kuch sikha hain mene❤❤ actually im new in flutter, that's why thora complex lag raha hain, love from bangladesh❤❤

  • @abhinavsinghclaire6768

    So here is a solution who's notification is not showing while app is in background
    Add this in res/values/styles.xml
    fcm_default_channel

  • @laxmanmurjani8007
    @laxmanmurjani8007 Před rokem

    difficult to tolerate you

  • @Arjuns_World
    @Arjuns_World Před rokem

    [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference, null, java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference. --------->> got this error, I am able to get notificaton in console but unable to show them.

    • @thetechbrotherss
      @thetechbrotherss  Před rokem

      did you initialise the local plugin.

    • @Arjuns_World
      @Arjuns_World Před rokem

      @@thetechbrotherss yes I did same as you did

    • @alisidhu-qo4fd
      @alisidhu-qo4fd Před 7 měsíci

      Simply ha Bro jo hm *AndroidNotificationDetails* dy raha hy as ka Constructor ka andr ak named Parameter ha " icon" name ka as ma hm na srf apni app ka icon String literial ma dlna aur App ko HotRestart kr lana inshallah issue resolve ho jaye ga 😍😍

  • @controlledmonster
    @controlledmonster Před rokem

    W/ConnectivityManager.CallbackHandler(12093): callback not found for CALLBACK_AVAILABLE message brother i am getting this. watched video 2-3 times but didnt find anything.

    • @thetechbrotherss
      @thetechbrotherss  Před rokem +1

      You should provide the reference of function to the onPressed callback.