Flutter Background Services and Foreground Service Tutorial part 1

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.ย. 2024

ความคิดเห็น • 107

  • @dart-kotlin-dev
    @dart-kotlin-dev 9 หลายเดือนก่อน +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

  • @dzaenkireolm
    @dzaenkireolm ปีที่แล้ว +3

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

  • @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 8 หลายเดือนก่อน

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

  • @AbhishekJain-o8h
    @AbhishekJain-o8h 13 วันที่ผ่านมา

    Is there a part 2 following this video?

  • @chchandrasekhar5575
    @chchandrasekhar5575 7 หลายเดือนก่อน +1

    Super bro it is working thank you for this video

  • @Haru-iu2rf
    @Haru-iu2rf ปีที่แล้ว +1

    Thank you so much for this tutorial

  • @abdifatahnour4191
    @abdifatahnour4191 ปีที่แล้ว +1

    Many thanks to you, your video helped me.

  • @sikkicoding
    @sikkicoding ปีที่แล้ว

    Thank you scrip academy for covering important topic

  • @ironmans234
    @ironmans234 4 หลายเดือนก่อน +1

    thank you sir your code work

  • @trendingfeelingsongs
    @trendingfeelingsongs 3 หลายเดือนก่อน

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

  • @user-xj5fg5qy3l
    @user-xj5fg5qy3l หลายเดือนก่อน

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

  • @sandeepsandy3786
    @sandeepsandy3786 6 หลายเดือนก่อน +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 5 หลายเดือนก่อน

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

  • @vasyasolovyov6702
    @vasyasolovyov6702 ปีที่แล้ว +1

    Thanks you!

    • @justflutter
      @justflutter  11 หลายเดือนก่อน

      Ios part will be uploaded next week

  • @C8705
    @C8705 ปีที่แล้ว +1

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

  • @Tiktop-ld8qq
    @Tiktop-ld8qq ปีที่แล้ว +1

    Great 👍 sir

  • @Amjadkhan-kn2qt
    @Amjadkhan-kn2qt ปีที่แล้ว +1

    Great tutorial

  • @HamdaShahid-j8w
    @HamdaShahid-j8w หลายเดือนก่อน

    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

  • @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 12 วันที่ผ่านมา

      Ek app try karna mullah ki daud masjid tak

  • @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)

  • @nomanmughal4764
    @nomanmughal4764 10 หลายเดือนก่อน

    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?

  • @officialismailshah
    @officialismailshah 6 หลายเดือนก่อน

    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  6 หลายเดือนก่อน

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

  • @thiagofurlan6763
    @thiagofurlan6763 8 หลายเดือนก่อน

    Excelent video!

    • @justflutter
      @justflutter  8 หลายเดือนก่อน

      thankyou

  • @BOYGG-be8tb
    @BOYGG-be8tb 4 หลายเดือนก่อน

    Is possible to place websocket listener code in 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

  • @illiteratenerd
    @illiteratenerd ปีที่แล้ว +2

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

  • @sumanth_g_l1120
    @sumanth_g_l1120 ปีที่แล้ว +1

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

    • @justflutter
      @justflutter  11 หลายเดือนก่อน

      Security reasons

    • @antoniofuller2331
      @antoniofuller2331 หลายเดือนก่อน

      ​@@justflutterthen how do people make music players??

  • @farhadadarbar
    @farhadadarbar ปีที่แล้ว

    thnx big man

  • @user-lu8mi5ny1w
    @user-lu8mi5ny1w ปีที่แล้ว +1

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

  • @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.

  • @himanshukumargupta9993
    @himanshukumargupta9993 ปีที่แล้ว

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

    • @justflutter
      @justflutter  ปีที่แล้ว

      may be you did't define it

  • @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

  • @mohdramzan770
    @mohdramzan770 8 หลายเดือนก่อน

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

    • @justflutter
      @justflutter  8 หลายเดือนก่อน

      which error

  • @nidasensoy9498
    @nidasensoy9498 11 หลายเดือนก่อน

    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.

    • @justflutter
      @justflutter  11 หลายเดือนก่อน

      Ok let me check it then

    • @TheEgyptianflutter
      @TheEgyptianflutter 4 หลายเดือนก่อน

      @@justflutter I have the same issue have you solved it ?

  • @jorgericardorodriguezzapat427
    @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 8 หลายเดือนก่อน

      Please part 2!@@justflutter

  • @usamasadiq5857
    @usamasadiq5857 11 หลายเดือนก่อน

    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  11 หลายเดือนก่อน

      Bro vo notifications hoty hen.
      Background tasks nahi

    • @usamasadiq5857
      @usamasadiq5857 11 หลายเดือนก่อน

      @@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

  • @manishgautam2424
    @manishgautam2424 ปีที่แล้ว

    What about windows and Linux or Mac background services

  • @fernandomontenegro7425
    @fernandomontenegro7425 5 หลายเดือนก่อน

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

  • @codecraftmanisha_official
    @codecraftmanisha_official ปีที่แล้ว

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

  • @melomanzer5508
    @melomanzer5508 ปีที่แล้ว +1

    No part two?

    • @justflutter
      @justflutter  11 หลายเดือนก่อน

      Part two will be on iphone

  • @reelstoday9
    @reelstoday9 หลายเดือนก่อน

    not working in android 14

  • @manishkarki8119
    @manishkarki8119 10 หลายเดือนก่อน

    Where is part 2?

  • @fatihdemir4639
    @fatihdemir4639 ปีที่แล้ว

    part 2 please...

  • @melikesoygullucu
    @melikesoygullucu ปีที่แล้ว +1

    Sir where is part 2?

    • @justflutter
      @justflutter  11 หลายเดือนก่อน

      Uploaded next week

  • @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

  • @watchshortshere
    @watchshortshere ปีที่แล้ว +1

    SIR CAN I GET THE CODE

    • @justflutter
      @justflutter  11 หลายเดือนก่อน

      Next week

  • @melomanzer5508
    @melomanzer5508 ปีที่แล้ว

    IS it mandatory to show notifications ?

    • @justflutter
      @justflutter  ปีที่แล้ว

      yeah for foreground task.

  • @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

  • @CodeWhizxyz
    @CodeWhizxyz 5 หลายเดือนก่อน

    bro please share source code

  • @jeanpierreunis
    @jeanpierreunis 9 หลายเดือนก่อน

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

    • @justflutter
      @justflutter  8 หลายเดือนก่อน

      for IOS I have to work around more

  • @quanghuybui7694
    @quanghuybui7694 ปีที่แล้ว

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