It might not be easy to get your app into process death "naturally" but it will eventually happen so the question if you should handle it or not is not really there
@АлександрПальчевский-г7о2 жыл бұрын
Mitch, you have a talent to explain a complicated things in a simple way. Thank you! I love your courses!!!
@thomasfolmer79124 жыл бұрын
I recently found your channel and there is so much to discover and learn ! Thanks and congratulation for the content !
@tiagosutter88213 жыл бұрын
Thanks for great content Mitch. The project that i work on is one of those project that handling process death really matters, we are facing big issues due to not properly handling process death, this content is going to be useful.
@mrmooshu73813 жыл бұрын
Nice to see that you have the same opinion my team arrived at when we considered process handling for our production app!
@catalinghita77213 жыл бұрын
You can now retrieve an instance of your ViewModel without any additional configuration (without Hilt for example). The default ViewModel factory now provides the appropriate SavedStateHandle to your ViewModel so you don't neccesarily need a special factory for it
@rahhi97924 жыл бұрын
great content mitch. love it
@bboydarknesz3 жыл бұрын
Hi, here is my engement. The Assisted constructor have problem in newer version. @HiltViewModel class RecipeListViewModel @Inject constructor( private val randomString: String, private val repository: RecipeRepository, @Named("auth_token") private val token: String, @Assisted private val savedStateHandle: SavedStateHandle, ) required AssistedInject annotation in constructor, after applied it, my others DI asking for Inject annotation in constructor. Any idea, sir ? thank you
@pushkar.anand153 жыл бұрын
Hi Kevin, I faced a similar problem but found the fix. With the @HiltViewModel we can have the SavedStateHandle as a dependency without having to annotate it with @Assisted. So we can use SavedStateHandle without any annotation. Now I didn't look too deep into whether we can have the SavedStateHandle as a dependency without having to annotate it with @Assisted but I tried it and it works for me. Here is the source where I found the fix: github.com/google/dagger/issues/2287#issuecomment-771671159
@haojungao67383 жыл бұрын
@@pushkar.anand15 Cheers man, this solution is really helpful!
@Zhuinden4 жыл бұрын
I dunno I have 4 GB RAM and when I could still visit places with food in them, just the camera then Google Maps were enough to get process death to happen 🤔 Anyway, overall good advice because process death IS important 😉 you can reduce the amount of code you wrote to make it happen with SavedStateHandle.getLiveData
@kimworks83193 жыл бұрын
I knew I would find you here.
@Zhuinden3 жыл бұрын
@@kimworks8319 I show up on process death related things :D
@muhammedshahin62992 жыл бұрын
Thank you mitch
@abdulmateench.56183 жыл бұрын
Hey Mitch...you are just awesome....
@marcoaureliosym3 жыл бұрын
Nice tutorial, Mitch! I have a question: what if I have opened 3 activities before the Process Death, for example. How can I re-open the last activity that the user was navigating?
@DjangoMx3 жыл бұрын
Hey, did you resolve the problem ? I was thinking on save a tracking of the user maybe in sharedpref or a file and thus reopen the last one act
@j2shoes2884 жыл бұрын
I have a question Mitch, How do you make Overnight blueberry French Toast, and also Cinnamon Toast?
@mytubekt4 жыл бұрын
We can do it via Android studio. In Logcat there is red button for running app, when you hover its says "Terminate Application" 😉
@kirolosmalak8582 жыл бұрын
you are genius 😍😍
@bakytdjumabaev4693 жыл бұрын
Mitch, thanks
@tarikhusin17672 жыл бұрын
in the newer ver. of Hilt no need for @Assisted !
@ajaydeepak97393 жыл бұрын
Thanks mitch anther great video.
@Andrey-pu1lv2 жыл бұрын
thank you
@niranz77453 жыл бұрын
awesome stuff
@mehulbisht97084 жыл бұрын
Mitch, if we were to cache results from the API into Room, then how to check how many results are already cached and which one's need to be loaded for the first time? Assuming that the API is not going to update it's contents frequently, Is checking the query parameters of the request that the user about to make a good approach?
@codingwithmitch4 жыл бұрын
I don't understand your question: "and which one's need to be loaded for the first time?"
@TheWerBelek4 жыл бұрын
Great content, thank you. I have a question: why do you use setter functions instead of kotlin properties (overriding set for vars)? Just a habit from java or is there a specific reason? Thanks once again!
@codingwithmitch4 жыл бұрын
Looking at the code again, habit I guess
@shivamsethi38294 жыл бұрын
gonna have some rice probably for lunch, awesome job
@codingwithmitch4 жыл бұрын
What about proteins?
@antoniodevic87044 жыл бұрын
Great video as always firstly :) The thing I wanna ask is are there any differences in process death when did by the OS ( low on memory so OS kills the app ) and when it is done manually through Android studio? What it did to me was when I terminated the process through Android studio it restored my last activity I was in before it went background and got killed , and when the OS killed the app it got restarted completely from the launcher activity. I can't find many resources online about this differences as mostly people point to the first case but not to the second. Can it be specific to device or manufacturer? I am running android 9, SDK 28 on Huawei honor lite 9 if it is of help to anyone with similiar situation :)
@cristianovecchi4 жыл бұрын
Great Journey!
@AyorindeAdesugba4 жыл бұрын
Nice
@abolfazlrezaei53973 жыл бұрын
hey Mitch, here's your engagement:)
@danyelsh8742 жыл бұрын
Engagement Thanks
@arpie26712 жыл бұрын
This was difficult
@Trosydman3 жыл бұрын
Random engagement!!!! And I had a capuccino for breakfast XD
@sanushradalage40913 жыл бұрын
Now the rain is over. I'm eating a burger. Engaged from Colombo, Sri Lanka
@Lioneldali4 жыл бұрын
the phone not running linux operating system and Android is not top of linux kernel
@codingwithmitch4 жыл бұрын
Sorry I didn't use the exact perfect terminology. It's a modified version of the Linux kernel
@speedboy936403 жыл бұрын
restore engagement state
@mishaeliseev3 жыл бұрын
My engagement : it's very hot in siberia today )))
@raghavendpai3 жыл бұрын
engagement💍💍💍
@edvardgrei65333 жыл бұрын
I ate macaroni for breakfast, it was delicious.
@raghavendpai3 жыл бұрын
buns💍💍💍💍💍💍
@moonlightcheese11 ай бұрын
I don't like the use of Hilt in your guides. Hilt integration should be separate. It's impossible to learn the underpinnings of SavedStateHandle from this video because it presupposes use of an injection framework. Introducing frameworks makes the learning curve higher. While your code might be simpler, you ask a newb to take it on faith that it works without explaining it. "It's just magic" is not teaching.