WorkManager - Android Basics 2023

  Рет қаралды 67,118

Philipp Lackner

Philipp Lackner

Күн бұрын

In this video you'll learn how you can execute long running tasks reliably with WorkManager by using a real-life example.
⭐ Learn all the professional technologies applied in the industry
⭐ 100% money back guarantee for 30 days
⭐ Become an industry-ready Android developer now:
pl-coding.com/...
🎁 Get my FREE 4.5h course "The Best Practice Guide to Android Architecture":
pl-coding.com/...
Read our weekly Android blog:
pl-coding.com/...
💻 Let me be your mentor and become an industry-ready Android developer in 10 weeks:
pl-coding.com/...
Follow me on Instagram for insights into my live as an Android developer:
/ _philipplackner_
Subscribe to my FREE newsletter for regular Android, Kotlin & Architecture advice!
pl-coding.com/...

Пікірлер: 86
@DanTheTravelDude
@DanTheTravelDude 10 ай бұрын
I liked that you never skip crashes or if something does not work even though you could have edited it. It is a big motivation and reminder that no one is perfect.
@andress.garciasobrado8627
@andress.garciasobrado8627 Ай бұрын
but my friend, you edited your comment😄
@nishantdalvi9470
@nishantdalvi9470 26 күн бұрын
@@andress.garciasobrado8627 😂😂😂😂
@aviiraj_sharma
@aviiraj_sharma 3 күн бұрын
@@andress.garciasobrado8627 no one is perfect 😆
@StealerSlain
@StealerSlain Жыл бұрын
It's really good that you provide more or less real-life examples in your videos. Keep it up
@bjugdbjk
@bjugdbjk Жыл бұрын
I was following your content from my very initial days !! I can only say the only consistent Channel for Android content in KZbin is only the one Phillip Lackner !! Extremly thankful as an Android Dev . Seriously one of the best playlist or most important playlist is the one what your doing right, Android basics 2023. Android is a beast it changes so much even chatGPT went mad many times when I query Android stuff and always I and up on your channel to learn stuff and get uptodate knowledge !! Power to you brother !! And do make this playlist extraordinary !!
@ano9161
@ano9161 Жыл бұрын
He doesn't like the way you spelled his name 😄
@mohameddouch9503
@mohameddouch9503 Жыл бұрын
How long to took you to learn Android dev ?
@ChrisAthanas
@ChrisAthanas Жыл бұрын
⁠​⁠@@mohameddouch9503 its been 10 years for me and I'm alwayslearning something new on Android
@AndrewDChristie
@AndrewDChristie 3 ай бұрын
Thanks!
@konstaNa
@konstaNa Жыл бұрын
Thank you! This one is great! Goes from start till end without cutting to much on corners, and without unnecessary things that are not related to WorkManager itself
@ArshamJafariGharibvand-bd6dj
@ArshamJafariGharibvand-bd6dj Жыл бұрын
Thanks man, you are a savior.
@mdisi5967
@mdisi5967 Жыл бұрын
I really like this series, it is a good refresher. Great work!
@critikalfade
@critikalfade 8 ай бұрын
I love live demos, good content, keep it up!
@mikeshilovski1512
@mikeshilovski1512 Жыл бұрын
King of the android KZbin channels ahah
@mauricio0guaruja
@mauricio0guaruja Жыл бұрын
considering that the file size of the compressed file is going to be ordered in relation to the quality it would probably be doable to make a binary search of the optimal quality instead of a linear search from 100 until 0.
@mahdiporkar236
@mahdiporkar236 Жыл бұрын
keep it up philipp you are great
@rafamatias1
@rafamatias1 Жыл бұрын
Thanks Philipp! Amazing video! Greetings from Brazil.
@festusishioma5096
@festusishioma5096 Жыл бұрын
Thanks for this tutorial. I learnt a lot
@LethalFellowship
@LethalFellowship 2 ай бұрын
Assuming rounding algorithm is nearest rather than floor, if you multiply 5 by 0.1 and round it back to int, you'd just get 5 again, so the loop will be infinite at low quality values. To fix this you need to check that the new quality value is strictly less than the previous one, otherwise just subtract 1, or use floor rounding.
@tch.777
@tch.777 Жыл бұрын
Delicious video as always, thanks!!🙏
@virendrasingh-dt3mv
@virendrasingh-dt3mv Жыл бұрын
Love the playlist ❤
@L4szcZ
@L4szcZ Жыл бұрын
Great job Philipp! Can't wait for another video with contentResover uri etc like you mentioned. I got two questions: 1. Couldn't we check WorkManager result "success" instead checking if data != null? 2. Is it good practice to have workManager injected in view? I see we need applicationContext for that so maybe that's why but I am wondering if we could have it in viewModel or if we would place workManager in viewModel directly it would be bad practice? Thank you for your great work!
@2chotti
@2chotti 7 ай бұрын
Thank you
@nomugop8017
@nomugop8017 Жыл бұрын
thats what i needed, thx
@РоманБорцов-с1я
@РоманБорцов-с1я 3 ай бұрын
ty it helps
@vilmarcabanero2500
@vilmarcabanero2500 Жыл бұрын
Another helpful videoooo ❤❤❤
@undeadredemption_
@undeadredemption_ Жыл бұрын
Thanks man 🙌🙏
@ronaldv.7931
@ronaldv.7931 5 ай бұрын
As a web developer, Android development seems quite complex, especially if this is considered to be basics ;)
@himanshupatel-vo4qo
@himanshupatel-vo4qo Жыл бұрын
Sir its a humble request please create one video on the differences between mutableListOf() and ArrayList() when to use which
@mahmoudalkateb2008
@mahmoudalkateb2008 Жыл бұрын
there is actually no big different, note that the ArrayList is the implementation of of MutableList, in simple words if your building a music app, for the list of music you use the MutableList because you don't care about which one the user remove or add to the list, in the other hand ArrayList if you are developing a game for guessing words and you deal with entities for characters then you should use the ArrayList because the Characters will be drawn frequently on the screen and that won't be efficient with MutableList , and that's where the ArrayList comes handy it handles these operations well with good performance. it's always better think about how your app going to work, and then pick what is the best to use.
@himanshupatel-vo4qo
@himanshupatel-vo4qo Жыл бұрын
@@mahmoudalkateb2008 thanks for the explanation really helpful
@BlueIsLeet
@BlueIsLeet 3 ай бұрын
You can figure out the class it returns by using println(mutableListOf("foo").javaClass.name) Should be the same as ArrayList.
@remus2850
@remus2850 3 ай бұрын
How can I use use cases with resource class inside a worker class? Or should I inject the repository directly in the worker class?
@engineerOne
@engineerOne Жыл бұрын
Video was good❤
@harshalgaidhane2215
@harshalgaidhane2215 Ай бұрын
i need help..i started learning android by learning kotlin then this playlist, and as a beginner its really difficult for me to understand, what should i do?
@roshkaalex
@roshkaalex Жыл бұрын
Cool! Good job! Is any specific for workmanager and KMM?
@dennismunyaka6537
@dennismunyaka6537 3 ай бұрын
greetings kindly do you have a git repo where all this test codes are.? it would be really helpful
@omkarpawar1741
@omkarpawar1741 Жыл бұрын
Please provide tutorial about producing UI state and consuming it from UI and their side effects , specially with API's like LaunchedEffect, RemeberUpdatedState, RememberCorutineScpoe, ProduceState, derivedStateOf
@lawrencecendana9963
@lawrencecendana9963 Жыл бұрын
Im also having problems with the latest WorkManager version regarding applied constraints(it was working on prior WorkManager version).
@ChrisAthanas
@ChrisAthanas Жыл бұрын
Like what
@mustafa_inan1940
@mustafa_inan1940 Жыл бұрын
hey Philipp, can you make a video about, hiding bottomNavBar when scrolling in jetpack compose
@garrysingh4484
@garrysingh4484 Жыл бұрын
Goal : - Need to run a service in the background for 20-40 mins every 2 hour (Battery usage no issue) Correct me - if i m wrong : - WorkManagers workers thread has a hard limit of 10 minutes, which defeat the purpose of long running task in the background - I mean for short running repeated task its ok but for long running repeated task it doesn't work - As per my knowledge the best approach to run a long running repeated task is using foreground service - But some task doesn't need user interaction & some long running tasks doesn't need a foreground service ----> My question to you is what is the alternative ??? ----> To run the above task what options are available ???
@ChrisAthanas
@ChrisAthanas Жыл бұрын
you can process it in chunks, does it have to live the entire time? Maybe you need a foreground service after all
@garrysingh4484
@garrysingh4484 Жыл бұрын
@@ChrisAthanas It needs to be able to performs long task such upload large files (created files by another app) to the server, video cam stream, audio stream, more etc. But the main thing is it has to be reliable service i mean once the file started uploading or Camera Stream it shouldn't be killed by Android System (Works on Android 7 or 8 but since Oreo its a trouble) - Foreground service will work but that defeat the purpose !!!
@ChrisAthanas
@ChrisAthanas Жыл бұрын
@@garrysingh4484 yeah I think you will have issues with that strategy bc google is killing apps without foreground notification Google is specifically banning that kind of use case that you have described due to privacy issues What's your use case here?
@llothar68
@llothar68 Жыл бұрын
Not possible anymore. Thank the crypto miners for this. Security takes away freedoms and opportunities
@sebastianpalm3495
@sebastianpalm3495 Жыл бұрын
does work manager works when the app is closed? I tried it and doesn't seems so. Btw thanks thanks a lot for all you videos they help me a lot!
@PhilippLackner
@PhilippLackner Жыл бұрын
It does, that's the whole point of work manager 😄
@faouzibelahmar1777
@faouzibelahmar1777 10 ай бұрын
Dear, please help me, after coding the app exactly the same as yours, the intent never fire and i got eacht time i pick a picture , a new instance of the app. Please note that i added singletop in the manifest file. thank you in advance.
@jimpauloovejera2599
@jimpauloovejera2599 Жыл бұрын
Please mention if WorkManager now works properly with Chinese OEMs
@padmakargarg9720
@padmakargarg9720 Жыл бұрын
XIaomi device does not dismiss lockscreen when opening Activity from background (VOIP Call) please help me out regarding this point
@AndreaBonatti
@AndreaBonatti Жыл бұрын
If someone is stuck with a gradle error with the WorkManager dependecy the solution is create a project with the miniumum android sdk as Android 12 (S) because the WorkManager Version >= 2.7.0 is required for apps targeting Android 12 (S)
@abuiman5251
@abuiman5251 Жыл бұрын
👍🏻👍🏻👍🏻
@Holy605
@Holy605 Жыл бұрын
Hey Phil,How can i get remote work for Android developer as a fresher??
@alillolindo
@alillolindo 11 ай бұрын
how is to compress to WebP? Because the same procedure don't work only changing the jpeg format to webp
@muhannddh
@muhannddh Жыл бұрын
I can't find your GitHub link.
@samarthgupta5077
@samarthgupta5077 8 ай бұрын
When I add the onNewIntent function, it shows "onNewIntent overrides nothing". And if I remove the null checks(i.e. the question marks), Then my app is crashing saying "Reading a NULL string isn't supported". Someone help.
@DraganN-d3p
@DraganN-d3p 4 ай бұрын
Instead of "override fun onNewIntent(intent: Intent?)", you should put "override fun onNewIntent(intent: Intent)", just delete the question mark.
@sesebere
@sesebere Жыл бұрын
I think a simple real-life should have been used so that it doesn't get in a way if the main thing - Work Managers and how they work
@streetchronicles5693
@streetchronicles5693 Жыл бұрын
Uree.... lol so funny. great videos
@aviniciusbass
@aviniciusbass Жыл бұрын
🇧🇷 Thanks
@TheZaurHasanov
@TheZaurHasanov Жыл бұрын
@jeetpattani2900
@jeetpattani2900 Жыл бұрын
Make Recycler view with Exoplayer2 (latest version). All edge cases with memory leak solutions and cache managing for less use resource (internet). Thanks dude.
@faouzibelahmar1777
@faouzibelahmar1777 10 ай бұрын
Sorry i forgot to say that when the new instance of the app appear, no picture is showed, and that i suppose because onNewIntent never fire
@matteoZattera
@matteoZattera Жыл бұрын
What if I power off the phone during a long WorkManager work?
@tharundharmaraj9045
@tharundharmaraj9045 11 ай бұрын
It gets resumed as soon as you turn on.
@forest__fires
@forest__fires Жыл бұрын
for beginner its too complicate bro. I didn't understand what's going on
@martinseal1987
@martinseal1987 Жыл бұрын
What's wrong with KEY_MAX_COMPRESSION
@darshanmukadam
@darshanmukadam 11 ай бұрын
WorkManager is so unpredictable. It keeps stopping when you remove your app from backstack!
@АртурШитиков-ь2ъ
@АртурШитиков-ь2ъ 6 ай бұрын
I don't want to say anything bad, but if you think about it, you use macOS but sit in Android Studio and program for Android - it's funny, isn't it? :)
@PhilippLackner
@PhilippLackner 6 ай бұрын
Since when did Android/Google have a viable desktop OS? :D
@bigpiglove
@bigpiglove Жыл бұрын
I have to say there is too much information unrelated to WorkManager. If the topic had been 'Image compression,' I could understand why there is so much code. But in terms of teaching beginners, it's very unnecessary to provide such a complex example of using WorkManager.
@mr.bubble1657
@mr.bubble1657 7 ай бұрын
Exactly
@vectoralphaSec
@vectoralphaSec Жыл бұрын
I didn't understand anything. I'm too stupid. I will never learn any of this.
@JONATHANFARRELEMANUEL
@JONATHANFARRELEMANUEL Жыл бұрын
Bro :v
@NimaAzh
@NimaAzh Жыл бұрын
you are not stupid. these contents of video are complex even for mid level developers.
@Punarjagran
@Punarjagran Жыл бұрын
take your time, rewatch it 5-10 times, make note of primitives of this tutorial, their philosophy.. and, see through awareness first the different realms: work manager make n enqueue, vm data set n compose using, code for compression, & extraction of work manager result data n putting in UI by launchEffect(based on watchDog key = result here, making it launch only when this value changes with reuse of activity in another image), FLOW OF DATA.. ISOLATE THESE REALMS & STUDY THE PHILOSOPHY OF THEM IN AWARENESS/OBSERVATION FIRST, DON'T FUSS OVER SYNTAX FIRST.!!! slowly rough sketch understand.. the nature of each entity: like workmanager = constraints, input data, retry policy, get result by uuid, enqueue.. I.E. ALLOWANCES OF THIS ENTITY GIVEN TO US DEVS. later go to syntax perfection.. then you may try to gulp it as a whole by joining all module together.. IT NEEDS ATTENTION OVER TIME, TO DEVELOP MOUTH TO GULP IT EASILY.. KEEP STICKING N BREAK IT AS PER CONVENIENCE INTO AS MANY REALMS AS U WANT, PERSONALLY. KEEP GOING :)
@Punarjagran
@Punarjagran Жыл бұрын
& make paper notes if needed
@josipmarasovic2436
@josipmarasovic2436 Жыл бұрын
my man i feel u for real, im solo learning for almost a 1.5 years it makes clear after some time just dont give up, i never trusted people that 1 day it all makes sense it really does just stick with it. I still have a lot to learn but i enoy proces of learning. Good luck we all gona need it hahaha
@TuringTested01
@TuringTested01 Жыл бұрын
nobody cares about android now
@josipmarasovic2436
@josipmarasovic2436 Жыл бұрын
why are u here man?
Uris (Unique Resource Identifier) - Android Basics 2023
14:21
Philipp Lackner
Рет қаралды 27 М.
Intents & Intent Filters - Android Basics 2023
25:36
Philipp Lackner
Рет қаралды 89 М.
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
MVVM vs. MVI - Understand the Difference Once and for All
18:40
Philipp Lackner
Рет қаралды 59 М.
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 4,7 МЛН
Content Providers - Android Basics 2023
22:40
Philipp Lackner
Рет қаралды 45 М.
ViewModels & Configuration Changes - Android Basics 2023
18:46
Philipp Lackner
Рет қаралды 145 М.
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН