Flutter Tutorial - Local Push Notifications 1/2 | Android & iOS

Поделиться
HTML-код
  • Опубликовано: 3 авг 2024
  • Send and schedule Local Push Notifications in Flutter for Android and iOS. Schedule repeatedly in background on a daily or weekly basis.
    Click here to Subscribe to Johannes Milke: ruclips.net/user/JohannesMilke...
    👉 12 Week Flutter Training | heyflutter.com
    👉 Flutter Masterclass Courses | heyflutter.com/masterclass
    Source Code | github.com/JohannesMilke/loca...
    My Courses | heyflutter.com
    Follow Newsletter | johannesmilke.com/#/newsletter
    SUBSCRIBE HERE
    bit.ly/JohannesMilke
    SUPPORT & SPONSOR ME
    github.com/sponsors/JohannesM...
    RESOURCES
    In-App Purchases & Subscriptions Tutorial: • Flutter Tutorial - In ...
    Publish App On PlayStore Tutorial: • Flutter Tutorial - How...
    Google Sheets Api Tutorial: • Flutter Tutorial - Goo...
    Send Email From App Tutorial: • Flutter Tutorial - How...
    Hover Effects & Animations Tutorial: • Flutter Tutorial - On ...
    Flutter Upgrade Tutorial: • Flutter Tutorial - Flu...
    Draggable Bottom Sheet Tutorial: • Flutter Tutorial - Dra...
    QR Code Scanner Tutorial: • Flutter Tutorial - QR ...
    SQL Database Tutorial: • Flutter Tutorial - SQL...
    NoSQL Database Tutorial: • Flutter Tutorial - Hiv...
    Search & Filter In ListView Tutorial: • Flutter Tutorial - Sea...
    Google SignIn WITHOUT Firebase Tutorial: • Flutter Tutorial - Goo...
    Google SignIn With Firebase Tutorial: • Flutter Tutorial - Goo...
    Animated List Tutorial: • Flutter Tutorial - Ani...
    Fix Bottom Overflowed By Pixels Tutorial: • Flutter Tutorial - Fix...
    TIMELINE
    0:00 Introduction Local Push Notifications
    0:20 What are Local Push Notification?
    0:47 Create Android Push Notification
    2:16 On Click Local Notification
    5:25 Create iOS Push Notifications
    6:16 Schedule Date & Time Push Notification
    7:53 Schedule Daily & Repeated Push Notification
    9:12 Schedule Weekly & Repeated Push Notification
    10:04 Schedule in Background Push Notifications
    10:26 Initialize Scheduled Notifications
    SHARE | SUBSCRIBE | LIKE FOR MORE VIDEOS LIKE THIS
    *********
    SOCIAL MEDIA: Follow Us :-)
    Twitter | / heyflutter_
    Linkedin | / heyflutter
    LEARN MORE
    SOURCE CODE | github.com/JohannesMilke
    ARTICLES | / johannesmilke
    PLAYLISTS
    All Flutter Videos | • Flutter Tutorial - Flu...
    Widgets - Flutter | • Flutter Tutorial - Flu...
    Plugins - Flutter | • Flutter Tutorial - Flu...
    Animations - Flutter | • Flutter Tutorial - Tra...
    Designs - Flutter | • Flutter Tutorial - Flu...
    Firebase - Flutter | • Flutter Tutorial - Pag...
    State Management - Flutter | • Flutter Tutorial - Riv...
    CREDITS
    Copyright song "Corporate Technology" by scottholmesmusic.com
    #Flutter #Tutorial #JohannesMilke
    LIKE & SHARE & ACTIVATE THE BELL
    Thanks For Watching :-)
    bit.ly/JohannesMilke
  • НаукаНаука

Комментарии • 320

  • @HeyFlutter
    @HeyFlutter  Год назад

    👉Join 12 Week Flutter Training: heyflutter.com
    👉Join the WhatsApp Channel to get the latest news about Flutter & HeyFlutter: whatsapp.com/channel/0029VaDNCZtC1Fu8nL2vmw3f
    Source Code: github.com/JohannesMilke/local_notifications_example

  • @haroldpepete
    @haroldpepete 3 года назад +17

    it really impressive, you deserve a olympic gold medal to the flutter best channel, you listen to the people, that kind of notification is what i wanted and you make this awesome video, take your gold medal right now

    • @bluyetiinc7553
      @bluyetiinc7553 3 года назад +1

      I'll second that. Perhaps multiple medals.

  • @kamilabduvaliev28
    @kamilabduvaliev28 3 года назад +24

    Hi, why you didn't mention that in order to schedule notification we need to add package timezone. I got confused for a while

  • @rameshbuvi3384
    @rameshbuvi3384 2 года назад +2

    Thank you Sir, you are everywhere, if I search something regarding flutter, first your video comes and I'm Satisfied with that itself. Thank you so much Sir. Please do more and do live Q and A. it will be helpful for many of us.

  • @souvikbanerjee1324
    @souvikbanerjee1324 3 года назад +1

    This channel is a real gold mine!

  • @dibyajyotiparida7316
    @dibyajyotiparida7316 3 года назад

    First time on your channel. You get a sub for being awesome 🤩. I needed this!!

  • @himesh_89
    @himesh_89 3 года назад

    The content you post are so high level..👍

  • @ehabt-4835
    @ehabt-4835 Год назад +10

    Important note: The 'IOS' prefix keyword has been replaced by 'Darwin' keyword. IOSInitializationSettings and IOSNotificationDetails are now DarwinNotificationDetails and DarwinInitializationSettings

    • @HeyFlutter
      @HeyFlutter  Год назад

      Thanks for updating, Ehab T-48! 🙂

    • @JSquiff
      @JSquiff Год назад

      Thanks for this!

    • @benbaffoe5461
      @benbaffoe5461 22 дня назад

      ​@@HeyFlutter Hello please do you know how to use send notifications from one device to other using local push notification and polling

  • @reemosman2207
    @reemosman2207 3 года назад

    Just in time ❤
    Thanks a lot 💐

  • @zaydc7316
    @zaydc7316 Год назад +1

    thank you! I was rushing too much whilst watching the video, and wondered why it didn't work until I watched the whole video again and realised I needed the 2 timezone packages installed too! Lesson learnt. Again thank you!

  • @erikapueblo6871
    @erikapueblo6871 2 года назад

    As always, thank you so much for your amazing tutorials!
    I just wanted to ask about multiple notifications. Only the last one saved would show up even though I tried changing the channel id.
    Hoping you could give some tips. Thank you!

  • @davidkanai6944
    @davidkanai6944 3 года назад +2

    fantastic work well explained

  • @Ronobuildstech
    @Ronobuildstech 2 года назад +4

    if you get an error(Unhandled Exception)... ,
    just go to AndroidNotificationDetails('channel id', 'channel name','channel description',
    icon:"@mipmap/ic_launcher",//add this line
    importance: Importance.max
    ),
    ensure you have your ic_launcher.png is in drawable folder(android\app\src\main
    es\drawable\ic_launcher.png)

    • @HeyFlutter
      @HeyFlutter  2 года назад +1

      Thank you, Ret Rono! 🙂

  • @Abolfazl-MI27
    @Abolfazl-MI27 2 года назад

    thanks for u r videos,I always use your viedoes as my first repo for leaninng !

  • @mettaman9169
    @mettaman9169 2 года назад

    Just what I needed! Mahalo!

  • @desdrianton5993
    @desdrianton5993 2 года назад

    You save my time man, great!

  • @ismailduo2290
    @ismailduo2290 2 года назад

    Thank you so much, you have a great talent.

  • @syndromx
    @syndromx 2 года назад +22

    2:05 won't work. The init method showed at 2:30 and its call in initState is a pre-requisite for 2:05 to work.

  • @jemmytech5474
    @jemmytech5474 3 года назад

    Thank you so much you made my day.

  • @ahmedjawad7350
    @ahmedjawad7350 3 года назад

    thanks for make so clear Joh.

  • @user-ps8zk7gm4n
    @user-ps8zk7gm4n 2 года назад

    Hey~ Thank you!! You helped me :)

  • @muhamadhaydar8419
    @muhamadhaydar8419 2 года назад

    Such a nice explanation video about notification.

  • @alvinimeje9899
    @alvinimeje9899 2 года назад

    Great tutorial. If you're implementing it now and can't get it to work on Android, ensure you've set your compileSdkVersion to 31 in your build.gradle file.

  • @fabsync
    @fabsync 2 года назад +2

    great video! you should consider creating a full course on this.. backend with multiple notifications features.. (text, images) alternatives to firebase.. nothing out there about this topic

  • @giorgoskoniakis7933
    @giorgoskoniakis7933 2 года назад +1

    Awesome video! thumbs up. I have a question tho. What can I do to open a specific screen in my app when the app is terminated?

  • @goldenlife6166
    @goldenlife6166 3 года назад

    Great work, cool

  • @ariuntsetsegmunhtulga3732
    @ariuntsetsegmunhtulga3732 2 года назад +3

    Oh Men , you made a lot of tutorials grateful and helpful to a new flutter developer. Thanks a lot

  • @hawarhekmat1174
    @hawarhekmat1174 2 года назад +1

    With FCM wow, thanks for your great work :)

    • @HeyFlutter
      @HeyFlutter  2 года назад +1

      Glad I could be of help, Thank you Hawar Hekmat! 😊

  • @onuryildirim634
    @onuryildirim634 3 года назад

    you are a great person

  • @jonesmondejar1742
    @jonesmondejar1742 2 года назад +1

    this is so helpful, btw is there a tutorial on how to disable and enable push notifications using toggle buttons?

  • @balazsszelig4840
    @balazsszelig4840 Год назад

    Thank you! You saved my new app!

    • @HeyFlutter
      @HeyFlutter  Год назад +1

      You’re most welcome, Balázs Szélig! 🙂

  • @rv9570
    @rv9570 2 года назад +1

    I found another alternative that looks very easy to implement and that is Awesome notifiction package, can you make please make a detail video on it ?

  • @iGhostr
    @iGhostr 3 года назад

    Hey! Very relevant video right now. We are developing an application for a smart pill dispenser. How reliable you think this package is, so that the user will receive notification always in time every day?

  • @janammaharjan2699
    @janammaharjan2699 2 года назад

    Awesome Thank you

  • @Amine0027
    @Amine0027 2 года назад

    Great video thank you man
    Just One note the notification initial is import for the firt example to work

  • @fahadmustafa650
    @fahadmustafa650 Год назад

    thank you man for saving my life

    • @HeyFlutter
      @HeyFlutter  Год назад +1

      You’re most welcome, Fahad Mustafa! 🙂

  • @muhammadshoaib.56
    @muhammadshoaib.56 3 года назад

    Awsome Work Sir

  • @akidfikriazhar1298
    @akidfikriazhar1298 3 года назад +2

    Nice one👍🏼👍🏼..can you make tutorial push notification with cloud function in firebase

  • @lainhathoang
    @lainhathoang 3 года назад

    thank you !

  • @kareemobaid6618
    @kareemobaid6618 2 года назад

    wonderfully amazing, you are really a blessing person for flutter developers, and i have a question , how can we push a notification based on time and date from date time picker. this would be greatly appreciated , thanks in advance Johannes

    • @kareemobaid6618
      @kareemobaid6618 2 года назад

      @@HeyFlutter thanks johannes, i have tried it many times , it doesn't work
      btw, i'm using one of your videos to pick date and time, i wanted to push the notification based on the date and time i select from DatetimePickerWidget, the link above didn't do the trick,.
      if you could help, i really would be thankful, and others would ues it a lot

  • @matepanyeczky6404
    @matepanyeczky6404 2 года назад +6

    Hi!
    Thanks for the video, it was incredibly helpful, even though I have a little issue, the notification does not appear. There's no error in the code, everything seems fine and during the debug I figured out every function has called that should have. Any idea?

    • @matepanyeczky6404
      @matepanyeczky6404 2 года назад +5

      Found the solution, dont forget about the permission :

  • @wilfredomartel7781
    @wilfredomartel7781 Год назад

    Nice work!

    • @HeyFlutter
      @HeyFlutter  Год назад

      Thank you, wilfredo martel! 🙂

  • @Pedro5antos_
    @Pedro5antos_ 2 года назад

    Thanks!!

  • @dipinsonwani4029
    @dipinsonwani4029 3 года назад +3

    Please make an updated tutorial for Flutter Firebase push notifications.

  • @cannelulrichevrardseka7917
    @cannelulrichevrardseka7917 3 года назад

    Good job

  • @travelfishingvn
    @travelfishingvn 2 года назад

    You are best

  • @designinflydif5716
    @designinflydif5716 3 года назад

    Of course the best practice

  • @user-hu4qe6sd5l
    @user-hu4qe6sd5l Год назад

    wonderful as usal

    • @HeyFlutter
      @HeyFlutter  Год назад

      Thank you, Fluttrr Projects2023! 🙂

  • @muhitmahmud995
    @muhitmahmud995 2 года назад +1

    Thank you for such a amaizing video. But I'm facing a problem.
    the notification comes in my notification tray as usual but it doesn't comes in top like a overlay whenever we get a new notification. How can i make sure whenever i ger a notification whatever I am doing the notification will pop up?

  • @kamalCode
    @kamalCode 3 года назад +6

    Sir, SOLID PRINCIPLES and design patterns, clean code

  • @tekocode
    @tekocode 3 года назад

    Thanks for all your videos.just if you can make video about notification using specific Id. I wish if you do it I did search all videos on RUclips no one made.Thanks again

  • @yunismaruf
    @yunismaruf 2 года назад +4

    2:06 when i click it ,show this error {PlatformException (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}

    • @yunismaruf
      @yunismaruf 2 года назад

      @@HeyFlutter thanks its work now :)

    • @kems1592
      @kems1592 2 года назад

      how do i solve this?

    • @yunismaruf
      @yunismaruf 2 года назад

      @@kems1592 just complete watching the video and write some code else that he mentioned,
      Or follow the link that he attached.
      It will work

    • @kems1592
      @kems1592 2 года назад +1

      @@yunismaruf bet thank you

    • @kems1592
      @kems1592 2 года назад

      @@yunismaruf I only need the local simple notifications. Which part is the one we need to initialize from that error?

  • @dogukanciftci8532
    @dogukanciftci8532 2 года назад

    Hi. Thank you for video. How can i catch the click on notification when the app is terminated? I'm using flutter local notification btw.

  • @ayusmanchiranjibi6007
    @ayusmanchiranjibi6007 2 года назад

    Is it possible to use a notification badge to use with local scheduled notifications or execute a function once a schedule notification is shown?

  • @user-vr9qb5rj4j
    @user-vr9qb5rj4j Год назад +1

    As always, your videos are super helpful. Thanks!

    • @HeyFlutter
      @HeyFlutter  Год назад +1

      You are welcome, Виктор Цай!

  • @lahceneguenane1848
    @lahceneguenane1848 2 года назад

    Hello, thank you very much for this video,
    I followed all the steps, but the code did not work even though I used the same package version,
    please help

  • @faisalbutt1322
    @faisalbutt1322 2 года назад

    hi thanks for it can you make like an alarm app where if app is killed notification run on specific day and time

  • @sazzadhossain9992
    @sazzadhossain9992 3 года назад

    Is it possible to show an alert dialogue instead of local notification when app is running for scheduled notification?

  • @masterprogrammer3059
    @masterprogrammer3059 2 года назад +1

    I have a problem, When I click on the notification it does not take me to any page

  • @renz8167
    @renz8167 2 года назад

    How about for dormant app user?
    Example- it will notify the user after a week of inactivity.
    Thank you

  • @svarupdesai
    @svarupdesai 2 года назад

    Why you used rxdart for onselect method? Could we not redirect user to different screen by implementing navigation directly on onselect method?

  • @NinjaGaming-te6od
    @NinjaGaming-te6od 2 года назад

    Hello johannes when I try the simple notify it always throw an exception.... Maybe u can help to figure it out? Do i need to use permission?

  • @mondelavictoria5453
    @mondelavictoria5453 2 года назад +11

    Sir, you made a lot of tutorials very nice and helpful to a new flutter developer.
    But, how come I can't access the source code easily?
    If you don't mind, I need to access your source code for each of your tutorials.
    So I can able to study and improve my learnings in a flutter.
    @ThankYouForTheUnselfishLearning

  • @lovekeshsinghkhalsa4251
    @lovekeshsinghkhalsa4251 2 года назад

    hi J Milke, hope u r fine. have you any knowledge about this bro? Actually, I just want to know if I update any product from the admin panel and how my clients get notifications of recently added products on the android and ios app. hope you understand what I want to say?

  • @learnnow9598
    @learnnow9598 3 года назад

    Good one💙. Bro make a webrtc video call app please man..

  • @marcellocamara
    @marcellocamara 3 года назад

    It`s possible to cancel only a specific scheduled notification and preserve others?

  • @peacefulmeditation9128
    @peacefulmeditation9128 Год назад +1

    I want learn how the user would be able to schedule their own notifications, like for a to do app. Or to be able to select a timeframe in which they’ll randomly be reminded of the things they need to do? Do you have any tutorials on that? If not could you make one?

    • @HeyFlutter
      @HeyFlutter  Год назад +1

      Thank You Peaceful Meditation! Follow this link: medium.com/flutter-community/local-notifications-in-flutter-746eb1d606c6
      I hope you will get your answer 🙂

    • @peacefulmeditation9128
      @peacefulmeditation9128 Год назад

      @@HeyFlutter wow that’s great, thanks a lot!

  • @netscapelabs647
    @netscapelabs647 2 года назад

    awesome

  • @fbwz3039
    @fbwz3039 2 года назад

    I have a question I don't find the answer to it considering local notifications and you seem to be an expert on this topic so I wanted to try to ask you^^ or someone in the comments:)
    My code looks pretty similar to the one in the video but I am asking myself one specific thing:
    Can I access the point in the code that happens just after the notification has been sent out?
    In more detail: I have a notification that shows at a certain time. And I want that something is happening just after the notification has been shown on the phone. For example: The notification on the phone pops up at 14.30 and the program should save this timestamp immediately after showing the notification (not before!!)
    Is there a solution to that?

  • @henrique.silva.1988
    @henrique.silva.1988 2 года назад

    Please enable video subtitles so that users from other countries can understand what you are talking about. Congratulations on your content.

    • @HeyFlutter
      @HeyFlutter  2 года назад +1

      Thanks, Henrique Silva! for your feedback 👍

  • @rabbihossen9734
    @rabbihossen9734 2 года назад

    thanks. how can add local notification daily and user change time . with sharedpreferences .

  • @derschmeidt2224
    @derschmeidt2224 5 месяцев назад

    Very good video! Thanks! Just one question: Is there a limit if I set daily notifications following your tutorial. I've read about a limit of 64 notifications for scheduled notifications. Thanks.

    • @HeyFlutter
      @HeyFlutter  5 месяцев назад

      Thank you, @derschmeidt2224! 🙂. Yes you can check their official documentation.

  • @Ticnoticos
    @Ticnoticos 2 года назад +3

    What is "tz" ? in the minute 7:00.
    i got this error: Undefined name 'tz'. (7:00)
    Try correcting the name to one that is defined, or defining the name.

    • @Ticnoticos
      @Ticnoticos 2 года назад

      @@HeyFlutter thanks!

    • @sandradascalu848
      @sandradascalu848 2 года назад

      Hi! Can you help me with this? It seems like he deletes his comments.

    • @Ticnoticos
      @Ticnoticos 2 года назад

      @@sandradascalu848 tz is the same import but with another name. Like import ... as TZ

    • @qazaqforte
      @qazaqforte 2 года назад

      Why did he delete the comment? Just, why?

    • @Ticnoticos
      @Ticnoticos 2 года назад

      @@qazaqforte tz i remember, was the alias of the import

  • @danyegon5530
    @danyegon5530 3 года назад

    If you can please create a tutorial of PayPal or credit card payment.or rather how the checkout process goes. Will be really helpful

  • @mahmood466
    @mahmood466 Год назад +1

    Great explanatory video! But there are some changes to the packages, so if you replace the video with a new one, that would be awesome!

    • @HeyFlutter
      @HeyFlutter  Год назад +1

      Thanks for the idea, Sayed Mahmood! 🙂 I have added it to my list of ideas for future videos!

    • @chhatrapatikumar7311
      @chhatrapatikumar7311 7 месяцев назад

      @@HeyFlutter would you try to make a local scheduled notification with datetime picker , so we can choose/select the date and time from it and schedule it with button onclick so ? , thanks!!

  • @AhmedKhaled-gm6sr
    @AhmedKhaled-gm6sr 3 года назад

    Is it possible to use local notification with a chat application without a FCM?

  • @zakblacki
    @zakblacki 2 года назад

    what about scheduled notification with user input on the UI instead of button click manually

  • @christo_nimal291
    @christo_nimal291 Год назад

    10.23 i noticed something when u called the _showScheduledNotification method in the initState u just give the normal timestamp right....instead of doing that we can make it optional parameter right?

  • @Thugbross
    @Thugbross 3 года назад

    Sir please do a video on ethereum push notifications service project

  • @samadshukr4111
    @samadshukr4111 3 года назад

    Does it show notifications when the app dead(close) for the IOS or you have to be in the app?

  • @vanRules92
    @vanRules92 Год назад

    thank you for your amazing video, im also following the official docummentation from the local notifcation package however my weekly notifications are not showing when the app is in the background or the app screen is locked, any idea why this might be happening? I have a samsung devide

    • @HeyFlutter
      @HeyFlutter  Год назад

      Thank You vanRules! Follow this link: stackoverflow.com/questions/53572110/flutter-push-notifications-even-if-the-app-is-closed
      I hope you will get your answer 🙂

  • @redsvision4026
    @redsvision4026 3 года назад

    Is there a way to use provider instead of rxdart

  • @qazqwe5419
    @qazqwe5419 2 года назад

    What about 'awesome_notifications' package?
    Can you compare both packages?

  • @jouhny3061
    @jouhny3061 2 года назад

    can we make app get data in background from api after a period of time and setting schedule notfication for this, how we make this in flutter app sir.

  • @pollyolly851
    @pollyolly851 2 года назад +1

    Thanks I like the implemention simple and clean.

  • @MarkyMarking
    @MarkyMarking 2 года назад

    Can the schedule notification work even when the app is closed?

  • @amandwivedi7413
    @amandwivedi7413 2 года назад

    Hello Sir, I Have Multivendor Grocery app on flutter as frontend and firebase as backend I have two apps : 1. Customer app for viewing product and ordering it. 2. Vendor App: Uploading a product and then checking who has ordered it. Sir I want to implement notification feature in my App, if the user place an order, vendor app should get notified that this user has placed his/her order how can i achive this Sir, I know I have to use , FCM for it, but sir Do i ned to make my own function and then deploy it to firebase or there is any other method . Please help Sir?
    Thank you

  • @Mohamed19Aamer
    @Mohamed19Aamer 2 года назад

    What are your dependencies?

  • @ranatr
    @ranatr 3 года назад

    Brother please create push notifications with firebase functions

  • @johnrendelmendoza5721
    @johnrendelmendoza5721 2 года назад

    How to choose specific date (day/month) ?

  • @user-tz3sd3sd6d
    @user-tz3sd3sd6d 2 года назад

    Do you know how to listen to system's notifications?

  • @codewithihsan2182
    @codewithihsan2182 2 года назад

    Hello Sir all the things working fine on emulator but schedule notification not working on real device specially when app is closed
    can you give me some hints for solving the issue

  • @alexyan7245
    @alexyan7245 2 года назад

    do you have push notification with php mysql sir?

  • @hamzasunasra7158
    @hamzasunasra7158 2 года назад

    please share link of second part

  • @abdelkrimmennai423
    @abdelkrimmennai423 2 года назад

    can i use this in firebase notification

  • @mcmp3657
    @mcmp3657 2 года назад

    What if we are sending only data {} in message,how to handle that in background and terminated state

  • @manishmg3994
    @manishmg3994 2 года назад

    mipmap launcher icon is not showing in notification pan,Any Solution ,can we pass any assets file path as string

  • @mehmetakifsayrm4152
    @mehmetakifsayrm4152 2 года назад

    I can push notification on android tablet even app terminated or background. But when I locked the screen, it is not awake with notification. Also at home screen, notification does not appear(shows only notification tray). Is there any solution for these problems ? I searched a lot but could not find any solution. Help :S

  • @saujanbindukar8717
    @saujanbindukar8717 2 года назад +1

    How to add user avatar on background notifications?

  • @kelpindev9150
    @kelpindev9150 3 года назад

    Wowww 🔥🔥🔥🔥