No video

WorkManager: Basics - MAD Skills

  Рет қаралды 38,615

Android Developers

Android Developers

Күн бұрын

Пікірлер: 48
@jonplaud
@jonplaud 3 жыл бұрын
This is the FIRST video where someone explains what the program does line by line instead of just typing it down. Kudos!
@mooingturtle
@mooingturtle 3 жыл бұрын
Thanks! Glad you enjoyed this format.
@satyamsharma8240
@satyamsharma8240 3 жыл бұрын
Same love it
@jswaby
@jswaby 3 жыл бұрын
Thanks! I’ve been playing with work managers over the last 2 weeks. I would love more info on periodic tasks when the app is not running. Thanks!
@joaquimley
@joaquimley 3 жыл бұрын
Loved the pace, not too slow but not making a lot of assumptions about what the viewer might be watching. I've been using WorkManager for some time now and still found the pace on-point! Allowed me to follow with ease. Something I noticed: The mic seems to be attached to the table where the keyboard is, it is a bit annoying to hear the "bumps" especially with headphones. TY for the great content as always.
@mooingturtle
@mooingturtle 3 жыл бұрын
Thanks for the feedback! Will work on avoiding those 'bump' noises in future videos.
@panemampojmaperla
@panemampojmaperla 3 жыл бұрын
I'm not sure you picked the correct example. Seems to me that blurring an image is a rarely deferable use case. Explanation was great, that example tho, not sure...
@magnatroz
@magnatroz 3 жыл бұрын
It may not be a deferable use case, but it can take a long time to process the image. So, you can use workmanager to manage the blurring on the background without any kind of risk of the computation been interrupted in the middle and make the app usable while it is processing and saving the image.
@keyboardsurfer
@keyboardsurfer 3 жыл бұрын
WorkManager nowadays is not only about deferrable or periodic work. It is a great solution for any task that's long running.
@akashdeepwadhwa5828
@akashdeepwadhwa5828 3 жыл бұрын
i am not sure how image bluring logic works ..but this video realy explained use case of work manager in best way
@cleofaspintolimalima1627
@cleofaspintolimalima1627 3 жыл бұрын
and good, that you leave the workmanager documentation thanks so much
@foivosstamopoulos4106
@foivosstamopoulos4106 3 жыл бұрын
Great explanation! Thank you!
@GakisStylianos
@GakisStylianos 3 жыл бұрын
Great video, very well explained, even for someone who's never used workmanager myself I could follow along easily!
@mathankumarIT
@mathankumarIT 6 ай бұрын
@mooingturtle Thanks for the proper guidelines. The way that you have explained about the each features and the code is awesome. The best tutorial video loved it.
@annettejones5213
@annettejones5213 3 жыл бұрын
Never used work management before, but I'll try
@azeddinehamdaoui8631
@azeddinehamdaoui8631 3 жыл бұрын
go for it
@RinoSss
@RinoSss 3 жыл бұрын
Some one can give me a use case where I can't execute a long running task simply using a coroutine instead of work manager? I'm still able to decide which thread to use with coroutines
@satyamsharma8240
@satyamsharma8240 3 жыл бұрын
Corutines uses application lifecycle, while work manager doesn't, managing coroutine can be difficult and as fair threading goes you can use local scoped coroutine or fork pool or parallel work, for any long running task that doesn't require user interaction, work manager and alarm manager (for period task) are best apis
@gouravrawatscience
@gouravrawatscience Жыл бұрын
hello Sir/Mam work manager is not working in all Chinese Phones Problem is that workManager is only working when app is in foreground or background as soon as user removes app from task manager than the work which I posted in OneTimeRequest or PeriodicRequest it is not running any more. It is working in samsung and emulator but not on realme,readmi,vivo,infinix,xiomi etc chinease mobiles based on android. Please help
@GN9K71
@GN9K71 3 жыл бұрын
Is it possible to get result from the workmanager via Flow instead of livedata?
@joubertildefonsosilva5671
@joubertildefonsosilva5671 2 жыл бұрын
Como usar o Android (Xiaomi como plataforma de navegação" sem ser engolido pelos concorrentes...
@erictsang0
@erictsang0 3 жыл бұрын
The thing i don't really like about this API is that the data passed around are persisted, so you'll need to handle data migration of risk losing pending work requests
@LeftyRC
@LeftyRC 3 жыл бұрын
This is amazing.
@navczydev
@navczydev 3 жыл бұрын
Great information thanks
@duduskateboarddudu
@duduskateboarddudu 3 жыл бұрын
Nice code!!
@chisomemmanuel6160
@chisomemmanuel6160 Жыл бұрын
Please 😭, is this video available in Java language
@ahmedmohammed9395
@ahmedmohammed9395 3 жыл бұрын
Does this mean that WorkManager is replacing multithreading solutions like Coroutines, RxJava, etc.?
@keyboardsurfer
@keyboardsurfer 3 жыл бұрын
No. WorkManager is your gateway to making long running operations easy. You'll write your async code using Coroutines or others.
@unistern
@unistern 3 жыл бұрын
thanks for the video but i run into following problem: in the dowork method i can read firestore document successfully BUT IF I execute code in the onsuccessListener callback it never runs. check the following snippet and please give me some hints . thank you @NonNull @Override public Result doWork() { String firebaseUserId = getInputData().getString("id"); FirebaseFirestore.getInstance().collection("users")document(firebaseUserId).get().addOnSuccessListener(new OnSuccessListener() { @Override public void onSuccess(DocumentSnapshot documentSnapshot) { Users user = documentSnapshot.toObject(Users.class); //Why following tasks are never executed???? how to solve this problem? // new StoreUserTask(user); //-> this is an AsyncTask // doExecuteInsertUserExecutorTask(user); //-> this call run on Executors.newSingleThreadExecutor(); } }); }
@SoulReaperDan1
@SoulReaperDan1 3 жыл бұрын
Why do you use the applicationContext instead of the context in the constructor? Should we do that as well?
@keyboardsurfer
@keyboardsurfer 3 жыл бұрын
Because that's what WorkManager requests. The application context lives longer than your activity context. And yes, you should be passing in an application context into your Worker classes as well.
@SoulReaperDan1
@SoulReaperDan1 3 жыл бұрын
@@keyboardsurfer thank you!
@jimpauloovejera2599
@jimpauloovejera2599 3 жыл бұрын
If you use Activity context, you will be leaking your app left and right
@ARIHANTJAIN27
@ARIHANTJAIN27 3 жыл бұрын
What is the best way to test work manager functionality?
@keyboardsurfer
@keyboardsurfer 3 жыл бұрын
Make sure to check back in on the playlist soon. We've got testing covered in a later video.
@mars3142
@mars3142 3 жыл бұрын
If I start a WorkManager from a service, what will be the App Standby Bucket? I want to write an accessibility tool, which is activated as a service, but my app isn't actively running in the foreground - no activity visible. Now, I'm afraid, if the WorkManager can be deferred up to 24h, which would be a real bad thing.
@keyboardsurfer
@keyboardsurfer 3 жыл бұрын
The app standby bucket depends on your app's usage by the user and not where you start WorkManager from. A11y tools can request exemptions from system battery optimizations.
@mars3142
@mars3142 3 жыл бұрын
@@keyboardsurfer So, my app will always be in the worst state, because it’s just a tool running in the background. The UI will be seen only once a month, I believe. That’s bad for the user experience, if you are writing an accessibility tool. Are you sure? And to force the user to exclude my app isn‘t good practice.
@keyboardsurfer
@keyboardsurfer 3 жыл бұрын
​@@mars3142 For many apps having the user request the exemption is necessary. When your app runs as accessibility service you get some special permissions, i.e. act on the users behalf. This means it should be treated as being in the foreground.
@mkc0321
@mkc0321 3 жыл бұрын
excellent video
@annettejones5213
@annettejones5213 3 жыл бұрын
Very good, and informing
@ARIHANTJAIN27
@ARIHANTJAIN27 3 жыл бұрын
Will the work manager request executes if app is not running at scheduled time?
@CharanjeevSingh007
@CharanjeevSingh007 3 жыл бұрын
Yes
@keyboardsurfer
@keyboardsurfer 3 жыл бұрын
If your app is not running and not restricted by the system or through user's choice, then WorkManager will execute your request on a best effort basis.
@skydoves
@skydoves 3 жыл бұрын
👍👍
@bananasba
@bananasba 3 жыл бұрын
Inhereitance all over the place again... When do you plan to start creating clean APIs?
@StraplessReligion
@StraplessReligion 3 жыл бұрын
first
WorkManager: Working in the background - MAD Skills
7:07
Android Developers
Рет қаралды 27 М.
KMP vs. Flutter - Who Will Win The Cross-Platform Battle?
16:19
Philipp Lackner
Рет қаралды 42 М.
Zombie Boy Saved My Life 💚
00:29
Alan Chikin Chow
Рет қаралды 6 МЛН
Советы на всё лето 4 @postworkllc
00:23
История одного вокалиста
Рет қаралды 5 МЛН
Lehanga 🤣 #comedy #funny
00:31
Micky Makeover
Рет қаралды 29 МЛН
WorkManager: Advanced configuration & testing - MAD Skills
10:14
Android Developers
Рет қаралды 13 М.
Fundamentals of Compose Layouts and Modifiers - MAD Skills
11:56
Android Developers
Рет қаралды 90 М.
Motion Layout: ConstraintSet animations - MAD Skills
9:45
Android Developers
Рет қаралды 34 М.
Hilt testing best practices - MAD Skills
10:29
Android Developers
Рет қаралды 20 М.
Run a Repeatable Work from the Background using WorkManager
12:26
Hilt and dependency injection - MAD Skills
13:06
Android Developers
Рет қаралды 47 М.
RecyclerView | Everything You Need to Know
25:07
Practical Coding
Рет қаралды 133 М.
Navigation: Dialog destinations - MAD Skills
8:46
Android Developers
Рет қаралды 28 М.
Zombie Boy Saved My Life 💚
00:29
Alan Chikin Chow
Рет қаралды 6 МЛН