Work Manager , Part 1 - Basics of WorkManager | Jetpack component

Поделиться
HTML-код
  • Опубликовано: 29 ноя 2024

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

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

    Sir, I am very impressed by the way you explore the topics and present us in a nice manner.
    Great!!!

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

    really you made it so easy to undrestand background services....
    thank you Sir...

  • @WeWant-td9bs
    @WeWant-td9bs 8 месяцев назад

    Thank you for solving the voice problem... Is this jetpack compose project? There is the XML file and button..

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding  8 месяцев назад

      Thanks for noticing. If you have watched recent uploads, you will observe that you will not find this problem. Thanks for constructive feed back. It always helps.

  • @Hanna-zj1gk
    @Hanna-zj1gk 2 года назад +1

    This tutorial is very helpful.May I know how to call the second application running in the background when first application is processing currently. I want my first application is processing while the second application is also running in the background without knowing the user that the second application is running in the background. I try with the background service but it doesn't work for me.? Please can u provide any relative sources.

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

    Can I use work manager to receive incoming sms when app is not running?

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

    sir I have set periodic time 15 minutes but work manager call sometimes in 3 minutes or 9 minutes etc. My question is why my work manager not is inconsistent in time? Why it is not call in every fixed 15 minutes?

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding  Год назад

      This is a known issues with Android Fragmentation. The OEMs some times override the default behaviour. I am pretty sure this is not a standard Google Nexus or Pixel device. Isn't it?

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

      @@Codetutor-DemystifyCoding No, It is One Plus mobile device

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

    Worker doWork runs on main thread or different thread ?

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding  2 года назад

      Just log the thread info from inside doWork and see whether it Logs it as main thread id, or some other random thread number. I have a hunch it will not be same as main thread. Try and comment.

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

    Very good explanation ❤️
    Can I use workmanager to generate a reminder notification to users every month?

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

    Sir please make videos on Android jetpack components all important architecture components.

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding  2 года назад

      I have already covered Jetpack components as part of Android Architecture series - ruclips.net/video/S_25hti4IEc/видео.html
      The Jetpack component is discussed in 11th video onwards.

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

    If I clear my app from the background, it doesn't work. Also it is not working when I restart the phone

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

    How can we use websocket foreground,

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

    good explanation.

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

    How to stop running worker?

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

    wow you are a great teacher

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding  3 года назад

      Wow, thank you. Feel free to explore other content on channel. Hope you have subscribed.

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

    Nice explanation.

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

    Good explanation. Sir but I implemented my worker to upload geo coordinates of person location even when my app exits,buts it's working when my app exits, I have given auto start permission then it's working for some time and it's getting stopped, again when I open my app it's restarting again. How can achieve proper working

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding  3 года назад +1

      You can not enforce hard time bounds using a WorkManager. It will run for sure but as per the convenience of scheduler. How are you doing the testing? How did you check it's run time and run periodicity?

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

      @@Codetutor-DemystifyCoding sir I will explain how i implemented my worker, as i know minimum time for periodic work request is 15 min, but I need to upload coordinates for every 2 min. So firstly i calling one time work request then when it enters into do work method i am invoking one more one time request with intial delay of 2 minutes, so it's goes on. I'm displaying toast of geo coordinates to check whether they got uploaded on my server. Problem is worker is doing my work but not proper, I mean if i start my work now, then close my app, it's displaying toast of coordinates for couple of times, then it's not showing any toast. Again when I open my app suddenly coordinates toast is being displayed .

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

      @@saradhi2845 in service onCancel you need start custom broadcast and in broadcast reciver you can again start service

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

      U need to make your worker as foreground

  • @kalidsherefuddin
    @kalidsherefuddin 11 месяцев назад

    Thanks for

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

    Why background task inconsistent in different devices... Developers will get in trouble in front of manager 😌

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

    Sir can I fetch current location change in the background using work manager .please help me out sir .. I need this badly

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding  3 года назад +3

      I would suggest use Foreground Service for that. WorkManager is not meant for forever running background task. Since you want to continuously keep track of the location, Foreground service is more suited. I have a tutorial on that topic as well, please do check it out. Hope this helps.

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

    Thanks.

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding  3 года назад +1

      You're welcome, Feel free to explore other content on the channel. Hope you have subscribed.

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

      @@Codetutor-DemystifyCoding I have 👍

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

    Is Work manager kill when app kills ? Means how it behave when app kill ?

    • @Codetutor-DemystifyCoding
      @Codetutor-DemystifyCoding  3 года назад +1

      Depends on how you have configured your WorkRequest. If it is OneTime then it executed only once, if you set it as Periodic, then it will get executed when when app is killed. I have tested it. It works. Even after the device boot, even if you don't launch the app, I have seen the logs of Worker getting started in back ground with approximate scheduled start time.