Flutter Background Services and Foreground Service Tutorial part 1

Поділитися
Вставка
  • Опубліковано 19 гру 2024

КОМЕНТАРІ • 110

  • @abhishekbhujel4158
    @abhishekbhujel4158 2 місяці тому

    Thanks for this video i had trouble understand this concepts for the past few weeks no my doubts are clear.

  • @meshkatshadik
    @meshkatshadik Рік тому +4

    can you please tell, why we don't use workmanager here. I saw workmanager is also able to do the background task. Then what's the difference between flutter_background_service and workmanager. In which case we choose flutter_background_service and in which we choose workmanager?

    • @justflutter
      @justflutter  Рік тому +1

      Work manager will execute code at once.
      Like if we set some sheduled messages..
      But background service is the services which continuesly run in background

    • @meshkatshadik
      @meshkatshadik Рік тому

      @@justflutter I've seen in the pub, workmanager , "This is especially useful to run periodic tasks, such as fetching remote data on a regular basis.",
      That means, it runs continously, am I right?
      In that case, I think you said the opposite

    • @nabinkawan9298
      @nabinkawan9298 11 місяців тому

      Yes, it runs in periodic basics not continuously.@@meshkatshadik

  • @sandeepsandy3786
    @sandeepsandy3786 10 місяців тому +1

    For Ios it is not Working , Can you Suggest any solutions to run service when app is in kill state , Any Suggestions from Others , it Helps me a lot , Thanks in advance

    • @RechieArnado-ni5rn
      @RechieArnado-ni5rn 8 місяців тому

      same. can you share if you already solved this problem?

  • @nanjiboyy7007
    @nanjiboyy7007 Рік тому +2

    Sir I'm working on namaz notification app and I want to receive notification on time so is it good approach to use this? Or how to get notifications in app killed state on time?

    • @justflutter
      @justflutter  Рік тому +1

      If app killed this is best approach

    • @justflutter
      @justflutter  Рік тому

      You can try workmanager too

    • @vibhavgupta4022
      @vibhavgupta4022 3 місяці тому

      Ek app try karna mullah ki daud masjid tak

  • @dart-kotlin-dev
    @dart-kotlin-dev Рік тому +1

    I hope this video helps me in my task. Will update after watching the video. Liked before
    Edit: It helped a lot. Thanks so much bro

  • @bensosfrequents
    @bensosfrequents 3 місяці тому

    my question is can I use services to upload images to server? if so how do I pass data from UI to background service. Do those services have parameters? Thank you

  • @C8705
    @C8705 Рік тому +1

    Got this error
    needs to hold android.permission.SCHEDULE_EXACT_ALARM or android.permission.USE_EXACT_ALARM to set exact alarms

  • @sumanth_g_l1120
    @sumanth_g_l1120 Рік тому +1

    Why does Flutter not support foreground services for Android 11 and 12

  • @AbhishekJain-o8h
    @AbhishekJain-o8h 3 місяці тому

    Is there a part 2 following this video?

  • @nomanmughal4764
    @nomanmughal4764 Рік тому

    what if i want to check charger in plug in or not??? when user connects the cable!!!

  • @muhamadirwan99
    @muhamadirwan99 Рік тому +1

    Is possible to place websocket listener code in background service?

  • @HamdaShahid-j8w
    @HamdaShahid-j8w 5 місяців тому

    there is neither the dependency block in my andriod.gradle file nor the build script block . but when i add it myself it gives a lot of errors for compatibility . the ext.kotlinversion is also not written there. how to figure out this? kindly help

  • @ASCTeam-q4b
    @ASCTeam-q4b 5 місяців тому

    i want to implement notification with timer when its duration is zero then remove notification otherwise show and user should not cancel

  • @BOYGG-be8tb
    @BOYGG-be8tb 8 місяців тому

    Is possible to place websocket listener code in background service?

  • @성이름-y9y3q
    @성이름-y9y3q Рік тому +1

    Is it only alive about 15-30 seconds in ios background service?

  • @nanjiboyy7007
    @nanjiboyy7007 Рік тому +1

    sir it is not sending the notification again and again just updating it

    • @justflutter
      @justflutter  Рік тому

      It is working fine my code.
      May be you are doing something wrong

  • @manvendrayadav9085
    @manvendrayadav9085 Рік тому

    is this possible I have to run background music on selected battery parsentage In IOS device (if I selected 45% battery on my device when it become 45per the alarm ring on background)

  • @mohdramzan770
    @mohdramzan770 11 місяців тому

    Main function you wrote 'await initializeService()' but it's giving error: plz help

  • @mubashirvp4519
    @mubashirvp4519 Рік тому +1

    But sir when i killed my app from recent in ios the service is being stop running. In android its working fine after killing the application. Is there any way to run same as in ios

    • @justflutter
      @justflutter  Рік тому +1

      There is a problem in this code for ios.
      I will release next part to resolve it

    • @mubashirvp4519
      @mubashirvp4519 Рік тому

      @@justflutter Thank you for your replay. And please release the next part asap .🙂

    • @ting7597
      @ting7597 Рік тому

      @script academy can you share update for the working iOS

  • @trendingfeelingsongs
    @trendingfeelingsongs 6 місяців тому

    I like this video, but background service is auto start, when I clicked stop service button and then next time application open.

  • @nidasensoy9498
    @nidasensoy9498 Рік тому

    ios background service doesn't work. On foreground it works. on Android it works both. I don’t understand why and i doesn’t find any solution after i searched deeply. Xcode doesn’t give me any error about it. Do you have any idea? I appreciate it if you give me some clue about it.

  • @chchandrasekhar5575
    @chchandrasekhar5575 10 місяців тому +1

    Super bro it is working thank you for this video

  • @officialismailshah
    @officialismailshah 9 місяців тому

    Nice content
    quick question sir is the notification in the background undismissable?
    like if I try to swipe left or right will it be dismissed?

    • @justflutter
      @justflutter  9 місяців тому

      Background services can not be dismissed. It constantly run unless you turn off from settings

  • @himanshukumargupta9993
    @himanshukumargupta9993 Рік тому

    In the main function you wrote 'await initializeService()' but for me it's giving error. Any idea why?

  • @dzaenkireolm
    @dzaenkireolm Рік тому +3

    holy shit!
    liked and subscribe thank you man!!!
    also share your code for more experimentation

  • @UKWithUsama
    @UKWithUsama Рік тому

    Sir I have implemented the background service and flutter local notification, Now I want to cancel background services and hide notificition, when user tap on cancel action in notification. Like youtube and google maps. Please guide. I am unable to handle cancel task, means where to call?

    • @justflutter
      @justflutter  Рік тому

      Bro vo notifications hoty hen.
      Background tasks nahi

    • @UKWithUsama
      @UKWithUsama Рік тому

      @@justflutter Thanks sir. Ma us task ko cancel krna chahta hun kesy ho notification sy

  • @codecraftmanisha_official
    @codecraftmanisha_official Рік тому

    I want background location when app is killed or terminated ..in flutter

    • @justflutter
      @justflutter  Рік тому

      on start method just call location

  • @melomanzer5508
    @melomanzer5508 Рік тому +1

    No part two?

  • @codecraftmanisha_official
    @codecraftmanisha_official Рік тому

    Does this work when app is killed or terminated if we remove from recent apps too

  • @sikkicoding
    @sikkicoding Рік тому

    Thank you scrip academy for covering important topic

  • @manishgautam2424
    @manishgautam2424 Рік тому

    What about windows and Linux or Mac background services

  • @abdifatahnour4191
    @abdifatahnour4191 Рік тому +1

    Many thanks to you, your video helped me.

  • @SkjoyBd
    @SkjoyBd Рік тому +1

    What is the real life use, just showing notifications? And your video would have been more helpful if you could have shown some work being completed in the background. Like calling data from an API, and storing it in a local database.
    Thanks anyway.

    • @justflutter
      @justflutter  Рік тому

      Will make another video within a couple of days to send location in background.
      Or any kind of service in nackground

  • @maazafridi2090
    @maazafridi2090 Рік тому +1

    ye video great hai sir....
    magar please sir.. phone auth mein problem arahi hai ... wo otp ajata hai magar sms naii ataa jiss mei code show ho.. please make a video on phone auth...
    emergency.

  • @melomanzer5508
    @melomanzer5508 Рік тому

    IS it mandatory to show notifications ?

  • @fernandomontenegro7425
    @fernandomontenegro7425 9 місяців тому

    Saludos, quiero que me ayudes con una app, y quiero saber cual es el costo

  • @unleedobj
    @unleedobj Рік тому

    is it possible to use more than one service?

    • @justflutter
      @justflutter  Рік тому

      Yes why not.
      What type of service you would like to put

    • @unleedobj
      @unleedobj Рік тому +1

      @@justflutter i want to continuous track user location and incoming calls, but both will only work if user start the service.

    • @unleedobj
      @unleedobj Рік тому

      @@justflutter i already has the code for both, but incoming call listener doesnt work, maybe because i use a kotlin code with EventChannel to do that.

    • @justflutter
      @justflutter  Рік тому

      @@unleedobj both can be put in background service

  • @quanghuybui7694
    @quanghuybui7694 Рік тому

    i try to apply your code into my app but i got this err: ERROR:flutter/runtime/dart_vm_initializer.cc(41)

  • @Haru-iu2rf
    @Haru-iu2rf Рік тому +1

    Thank you so much for this tutorial

  • @illiteratenerd
    @illiteratenerd Рік тому +2

    Bhai next time try adding the source code link so that we can get started and build on top of it.

  • @melikesoygullucu
    @melikesoygullucu Рік тому +1

    Sir where is part 2?

  • @ghayoorhussain8930
    @ghayoorhussain8930 Рік тому +1

    Women Safety Series Complete hogai h?

    • @justflutter
      @justflutter  Рік тому +1

      Yeh usi ki e part hy..
      Background p even app close ho g tab bhi shake effect chaley ga

  • @jorgericardorodriguezzapat427

    Please part 2, pleeeasseee ! Great video. Thanks. I need to catch incomming calls and I think this is almost what I need. I already have the code in android native, just need to know how to add that code into this plugin. Thanks

    • @justflutter
      @justflutter  Рік тому +2

      Coming soon!

    • @easytricks2674
      @easytricks2674 Рік тому

      @jorgericardorodriguezzapat427 Have you been able to find a solution. I have been searching, I even tried using workmanager but it gave me a missing plugin exception error. My situation is just like yours

    • @DaniCraft187YT
      @DaniCraft187YT Рік тому

      Please part 2!@@justflutter

  • @MohammadAliKadiwala
    @MohammadAliKadiwala 2 місяці тому

    not working in IOS

  • @manishkarki8119
    @manishkarki8119 Рік тому

    Where is part 2?

  • @watchshortshere
    @watchshortshere Рік тому +1

    SIR CAN I GET THE CODE

  • @reelstoday9
    @reelstoday9 4 місяці тому

    not working in android 14

  • @Tiktop-ld8qq
    @Tiktop-ld8qq Рік тому +1

    Great 👍 sir

  • @Amjadkhan-kn2qt
    @Amjadkhan-kn2qt Рік тому +1

    Great tutorial

  • @thiagofurlan6763
    @thiagofurlan6763 Рік тому

    Excelent video!

  • @fatihdemir4639
    @fatihdemir4639 Рік тому

    part 2 please...

  • @vasyasolovyov6702
    @vasyasolovyov6702 Рік тому +1

    Thanks you!

    • @justflutter
      @justflutter  Рік тому

      Ios part will be uploaded next week

  • @CodeWhizxyz
    @CodeWhizxyz 8 місяців тому

    bro please share source code

  • @jeanpierreunis
    @jeanpierreunis Рік тому

    useless for ios, it keeps it alive 15 to 30 seconds :(

    • @justflutter
      @justflutter  11 місяців тому

      for IOS I have to work around more

  • @BjKurdustan
    @BjKurdustan Рік тому

    thnx big man

  • @ironmans234
    @ironmans234 8 місяців тому +1

    thank you sir your code work

  • @JokoPitoyo-ec5zf
    @JokoPitoyo-ec5zf Місяць тому

    not working on ios