How to use WorkManager in android kotlin

Поделиться
HTML-код
  • Опубликовано: 30 июл 2024
  • What is WorkManager ?
    By using WorkManager, it is easy to schedule reliable tasks that are expected to run even if the app crashes or the device restarts. In this API, Android's background behavior restrictions have been refined over years to make it battery-friendly. Android applications that require background execution must adhere to this requirement!
    How to creat Notification in android kotlin :
    • How to creat Notificat...
    Github source:
    github.com/ezatpanah/Workmana...
    Medium's article :
    blog.devgenius.io/getting-sta...
    ✨ Join Medium to read thousands of valuable stories ✨
    / membership
    If you're looking to enhance your Android skills or have any questions about the field, feel free to reach out to me on MentorCruise. I'm here to support your growth and learning! Let's connect and learn together! 📚💡
    mentorcruise.com/mentor/reyha...

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

  • @hossamqandel5303
    @hossamqandel5303 Год назад +4

    Oh thank god.. Finally non indian tutorial for workmanager
    The video was amazing and clear explaning
    Please add more videos in tge futuer

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

      glad you like it , I will try my best 😊

  • @satyamprajapati4121
    @satyamprajapati4121 6 месяцев назад

    Great explanation. Subscribed!!!

  • @alexandralban5682
    @alexandralban5682 Год назад +2

    Thanks for video! It was really useful 30 minutes(some speed manipulation)

  • @jia_aaa
    @jia_aaa 3 месяца назад

    Explanation is so good, please make video on server related video with kotlin, how to manage data, write, read from remote hosting server..

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

    Great! Lecture~ Thx

  • @mostafasamy2002
    @mostafasamy2002 Год назад +2

    simple, and very nice video

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

    hey, thanks for the content! I have a question:
    you have set "createNotificationChannel" on the "doWork()" which means it will create a channel each time the scheduled job is executed.
    shouldn't the createNotificationChannel set on MainActivity to get created once?
    Thanks in advance.

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

    Thank you

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

    Can we call API call in WorkManager? After getting data from API store it in Room database everthing can we write in WorkManager?

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

      Yes, it's fine to call an API in Work Manager. It allows background task scheduling, including API calls, even when the app is not in use. However, you should use it responsibly to avoid excessive resource usage and ensure a good user experience.

  • @SunilKushwaha-nr6ip
    @SunilKushwaha-nr6ip Год назад

    Work Manager not working when app is killed by the user. Why? If you have idea please let me know thank you

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

      As I found out, the work manager depends on the device manufacturer. In my case, it is an miui device, which does not allow work manager to work in case the app is killed or rebooted. The work manager worked when I provided the application with "autostart permission".
      Work manager completely depends upon the manufacturer, Some manufacturers or you can also say devices with stock ROM were allowing work manager to work as it should be, but there are some devices manufacturers ("Chinese ROM's") were very aggressive while clearing the background apps, they're even killing the work manager, however, Google is trying to make work manager work normally on all devices by talking with OEM's.
      As of now If you really want to run anything in the background, you can turn on autostart option in xiaomi & some other devices or else you can also show a notification in notification tray which makes an app to run in the foreground. you can check whether the app is still running in the background or not, if not you can restart it.

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

    very nice tutorial keep going 👏
    but Medium's article link not working

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

      Thanks for your feedback 😊 glad to hear that 😊
      the link updated✅

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

    What emulator do you use?

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

      for this tutorial , I used smartphone , not emulator

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

      @@AndroidGeekCo but how you'd share smartphone screen on pc?

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

      I used LetsView letsview.com/ in this tutorial

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

    You 12 years ?