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...
Oh thank god.. Finally non indian tutorial for workmanager
The video was amazing and clear explaning
Please add more videos in tge futuer
glad you like it , I will try my best 😊
Great explanation. Subscribed!!!
Thanks for video! It was really useful 30 minutes(some speed manipulation)
Glad it helped! 😊
Explanation is so good, please make video on server related video with kotlin, how to manage data, write, read from remote hosting server..
Great! Lecture~ Thx
You're very welcome! 😊🙏
simple, and very nice video
Glad you liked it! 😊
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.
Thank you
You're welcome 😊
Can we call API call in WorkManager? After getting data from API store it in Room database everthing can we write in WorkManager?
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.
Work Manager not working when app is killed by the user. Why? If you have idea please let me know thank you
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.
very nice tutorial keep going 👏
but Medium's article link not working
Thanks for your feedback 😊 glad to hear that 😊
the link updated✅
What emulator do you use?
for this tutorial , I used smartphone , not emulator
@@AndroidGeekCo but how you'd share smartphone screen on pc?
I used LetsView letsview.com/ in this tutorial
You 12 years ?
!!!