Android LiveData Tutorial | Android Architecture Components Hindi- CheezyCode #6

  Рет қаралды 56,167

Cheezy Code

Cheezy Code

Күн бұрын

Пікірлер: 99
@satendrapal8630
@satendrapal8630 3 жыл бұрын
Hindi me padhaya to easily samajh aa Gaya . Official course is good but Hindi me jaldi samajh aata hai Good do your great work Sir 👍🙇
@mohdflame3944
@mohdflame3944 3 жыл бұрын
bhai i love ur voice 😎
@sandhyabhat7712
@sandhyabhat7712 2 жыл бұрын
Thank you for simplifying this concept. It was really helpful!!
@CheezyCode
@CheezyCode 2 жыл бұрын
You're very welcome!
@shubhmittal1189
@shubhmittal1189 2 жыл бұрын
This concept was so much interesting. Your easy explanation made it enjoyable. Thank you.
@CheezyCode
@CheezyCode 2 жыл бұрын
Thanks Shubh
@AmjadxDev
@AmjadxDev 3 ай бұрын
mujay yeh samj ni aya k LiveData ko use kia tab b data change howa to phir live data ko use krne ka advantage kia h yaha per? 10:14
@ketanwaghmare9327
@ketanwaghmare9327 2 жыл бұрын
Bro i was looking for the mentor like you...Thank You for sharing valuable content🙌
@CheezyCode
@CheezyCode 2 жыл бұрын
Thanks and welcome
@narayandhingra6921
@narayandhingra6921 2 жыл бұрын
Amazing man, your explanation are even more concise than kotlin :p keep it up
@CheezyCode
@CheezyCode 2 жыл бұрын
Thanks Narayan
@mrx4650
@mrx4650 2 жыл бұрын
😃
@H1MANSHU
@H1MANSHU 2 жыл бұрын
9:19 , why its recommended to set the variables private and declare an internal variable to set and get the deta ? like i always have a doubt between public var and private var , everyone say " taki koi or excess na kar paaye " what does it mean ? I am the person who is writting the program and i am creating many activities so i will be the only one who can access and change those variable values, even i don't have to create internal var again and again .. . I know this sounds like silly question but its what i have in my mind as a cronic doubt . 🙂
@H1MANSHU
@H1MANSHU 2 жыл бұрын
I asked this because its really its really inconvenient to me when i am dealing with bottom nav and fragments and only have one viewModel for the activity which contains all those fragments , so for every live data i use to think for two variable names one for the var and another for the internal var ! So what will happen if i declare all those live data variable public and the functions as well ?
@CheezyCode
@CheezyCode 2 жыл бұрын
Abhi karta hu answer
@CheezyCode
@CheezyCode 2 жыл бұрын
Got it...let's say you have a team of developers working on the same codebase. You did not follow good practices and you made everything public. You have 10 fragments using the same viewmodel. As you have exposed these publicly, some one from your team used it in one of the fragment to produce values and later some bugs come in. Now you have to go through those 10 fragments to figure out where it is happening. You could have prevented this if you only had one place for emitting values. So to keep it encapsulated, you have made sure that emitting only happens from one place that is inside the viewmodel. All others will be just consuming those values. This is why private variable are meant for internal use and public are public. This is encapsulation. Hope this answers your query.
@H1MANSHU
@H1MANSHU 2 жыл бұрын
@@CheezyCode waaw .. i got it ! now i know the real reason behind this ... Thanks for explaining with example .. 🙂
@DiwakarSingh-pz4ww
@DiwakarSingh-pz4ww 6 ай бұрын
How to call multiple api using MVVM architecture and LiveData
@devrungta3970
@devrungta3970 7 ай бұрын
For android dev, I always suggest his videos and rivaan ranavat for cross plaform
@govindchoudhary7311
@govindchoudhary7311 3 жыл бұрын
good sir
@soumayamondal6915
@soumayamondal6915 2 жыл бұрын
jast beautify explanation sir. plz share more video on Android
@CheezyCode
@CheezyCode 2 жыл бұрын
Thanks 👍...check the playlist section
@soumayamondal6915
@soumayamondal6915 2 жыл бұрын
@@CheezyCode i am very thankful to you. To helping me to learn mvvm concept.
@soumayamondal6915
@soumayamondal6915 2 жыл бұрын
Sir make video on shreviewmodel
@CheezyCode
@CheezyCode 2 жыл бұрын
Noted
@Anujkumar-be1eh
@Anujkumar-be1eh 3 жыл бұрын
Great Sir, Please make the Vidos on the Jetpack compose UI thanks
@CheezyCode
@CheezyCode 3 жыл бұрын
July ke baad - jab release version ready hojayega fir dekhte h - abhi XML kahi nahi jaane wali - 10 saal ka codebase maintain karna hoga jahan bhi jaaoge android ke liye.
@Techopener10
@Techopener10 9 ай бұрын
sir yeh jo aapne video ke end me song lgya h bo btado please
@anupsarkar3063
@anupsarkar3063 3 жыл бұрын
Great explanation....keep going 👏
@studio2038
@studio2038 2 жыл бұрын
thanks very clearly example
@ShubhamSinghMusic
@ShubhamSinghMusic 3 жыл бұрын
❣️❣️great video. Thanks!
@samraatsinghchauhan4379
@samraatsinghchauhan4379 3 жыл бұрын
BAng ơn, so simple. faadu bro
@prem_patel7
@prem_patel7 2 жыл бұрын
Thank you buddy 🤗😉😊👍
@CheezyCode
@CheezyCode 2 жыл бұрын
Thank you
@the_sharma_amit
@the_sharma_amit 3 жыл бұрын
4:43 --- how to create observer in java..
@rishabhgarg6692
@rishabhgarg6692 2 жыл бұрын
Hey when their is nothing in my livedata i.e value is null than observer didn't work am i right? val text = MutableLiveData() // Live data in viewmodel model.text.observe(this, Observer { // in main activity Log.d("tage", model.text.value?: "hi") txt.text = model.text.value }) Now my ques is this log didn't print anything , not even "hi" why?
@CheezyCode
@CheezyCode 2 жыл бұрын
As soon as data changes, observer is notified that - Hey! Data is changed - do the required changes. You need to post/set value in your live data to trigger the observer code
@rishabhgarg6692
@rishabhgarg6692 2 жыл бұрын
@@CheezyCode but my text view still have that hello world text, but expected it should be empty as from the livedata as data is different ?
@tusharsrivastava107
@tusharsrivastava107 2 жыл бұрын
declaring another variable as livedata apart from mutable live data in view model will make the view model bulky ? or is there any other solution to handle it.
@CheezyCode
@CheezyCode 2 жыл бұрын
Won't make it that bulky...segregate viewmodels as well...this is the way to use livedata
@riddhigupta5236
@riddhigupta5236 2 жыл бұрын
this course is for beginners?
@CheezyCode
@CheezyCode 2 жыл бұрын
Beginner friendly - considering little knowledge about Android Activities, Intents
@gauravmishra3503
@gauravmishra3503 3 жыл бұрын
Please make videos in java as well
@mojeebhasan5283
@mojeebhasan5283 3 жыл бұрын
why do we observe livedata in onCreate method of an activity?
@CheezyCode
@CheezyCode 3 жыл бұрын
Because when activity is re-created - oncreate will be called and we will get the data stored in ViewModel
@deepakborade4123
@deepakborade4123 2 жыл бұрын
Nice explain
@CheezyCode
@CheezyCode 2 жыл бұрын
Thank you Deepak
@alltechpoint8508
@alltechpoint8508 2 жыл бұрын
Thanks for explanation.
@CheezyCode
@CheezyCode 2 жыл бұрын
You're welcome
@sadaqathussain2062
@sadaqathussain2062 2 жыл бұрын
Great Sir keep it
@rishabhgupta655
@rishabhgupta655 2 жыл бұрын
Simply i use interface instead of livedata
@rahulKaushal39
@rahulKaushal39 3 жыл бұрын
Gold ke live rates : API se kaise karenge ??
@rohitjakhar6672
@rohitjakhar6672 3 жыл бұрын
Iske liye public libray mil jayegi pr production ke liye free nahi hogi Pr aap jsoup library ka use krke kidi bhi live rate wali website se data scrape kr skte ho
@vikashgupta2189
@vikashgupta2189 3 жыл бұрын
Great explanation bro👍 Keep it up
@CheezyCode
@CheezyCode 2 жыл бұрын
Thanks 🙂
@omsharmaudaipur
@omsharmaudaipur Жыл бұрын
amazing bro
@ajaykumarvishwakarma4720
@ajaykumarvishwakarma4720 2 жыл бұрын
setValue and postValue ka use bhi batana tha aapko. :)
@CheezyCode
@CheezyCode 2 жыл бұрын
😁 ek joke yaad aagya Bunny ye life hai kuch na kuch toh chotega he 😂
@ajaykumarvishwakarma4720
@ajaykumarvishwakarma4720 2 жыл бұрын
@@CheezyCode haha... Jarur
@islamicinsightbysaifi
@islamicinsightbysaifi 3 жыл бұрын
Sir, Make a video on Dagger Hilt
@mojeebhasan5283
@mojeebhasan5283 3 жыл бұрын
On rotating screen how a livedata can be observed because the viewmodel retain old data and the livedata is not updated?
@CheezyCode
@CheezyCode 3 жыл бұрын
As soon activity becomes active it will get the updated data from the ViewModel using LiveData
@a_72_saquibsheikh44
@a_72_saquibsheikh44 3 жыл бұрын
Thank you very much bro
@CheezyCode
@CheezyCode 3 жыл бұрын
Thank you Saquib
@hardcodeandroid
@hardcodeandroid 3 жыл бұрын
Very helpful video
@kt_radhakishan
@kt_radhakishan 2 жыл бұрын
Nice sir love you so much sir. Pls make a video on Livedata VS Fow. Pls pls pls pls Love from Indore MP
@CheezyCode
@CheezyCode 2 жыл бұрын
Noted
@kt_radhakishan
@kt_radhakishan 2 жыл бұрын
@@CheezyCode Sir are you from?
@CheezyCode
@CheezyCode 2 жыл бұрын
@@kt_radhakishan Noida
@raiadnan9724
@raiadnan9724 3 жыл бұрын
bro would you please tell us how we can play our quotes? I mean to say how we implement player in quotes app so user can read, listen and copy Qoutes at the same time.
@CheezyCode
@CheezyCode 3 жыл бұрын
1. Text to speech android 2. Copy to clipboard android Just search these terms, you will get your answers
@raiadnan9724
@raiadnan9724 3 жыл бұрын
@@CheezyCode your method is awesome and easy to understand that is why I request you to make a video tutorial. ❤️
@raiadnan9724
@raiadnan9724 3 жыл бұрын
@@CheezyCode I am not talking about text to speech. I am talking about how we play our quotes if we have mp3 files. I have my quotes app now I want user can also listen my quotes using play button. I also have all quotes mp3 files. I want to upload all my audio files on my server and fetch these mp3 files from server and play in kotlin. Now hope you understand what I mean to say.
@beyondlimits384
@beyondlimits384 3 жыл бұрын
@@raiadnan9724 as u got ur answer or not??
@ujjwalful
@ujjwalful Жыл бұрын
Thank you
@mdwasiahmad1109
@mdwasiahmad1109 3 жыл бұрын
Why nee live data?
@bilalfarooq7083
@bilalfarooq7083 Жыл бұрын
Awesome
@NiteshSingh-bv9lu
@NiteshSingh-bv9lu 3 жыл бұрын
what is difference between livedata and viewmodel ?
@CheezyCode
@CheezyCode 3 жыл бұрын
Check ViewModel Video as well
@NiteshSingh-bv9lu
@NiteshSingh-bv9lu 3 жыл бұрын
@@CheezyCode ok
@neerajverma9226
@neerajverma9226 3 жыл бұрын
ViewModel survive configuration changes such as orientation rotation, while Live data notifies data when it receives any changes
@NiteshSingh-bv9lu
@NiteshSingh-bv9lu 3 жыл бұрын
@@neerajverma9226 ok
@NiteshSingh-bv9lu
@NiteshSingh-bv9lu 3 жыл бұрын
I have use 1 activity and 2 fragments . if 1 fragment is destroyed .after that what happen in view model ? How to work view model in this situation
@neerajverma9226
@neerajverma9226 3 жыл бұрын
if we are dealing with list of objects with live data then how we can notify any changes to the observer?
@CheezyCode
@CheezyCode 3 жыл бұрын
notify observer ka ek extension function ho update karne ke liye...usko use kar skte h...ya ek separate list maintain karo...live data mei uska reference use kar skte ho...
@yashpatel-tz7gg
@yashpatel-tz7gg 3 жыл бұрын
I want the LiveDateExample Source code
@CheezyCode
@CheezyCode 3 жыл бұрын
Just write it down...it's a simple one
@govindchoudhary3177
@govindchoudhary3177 3 жыл бұрын
love you sir
@rohitjakhar6672
@rohitjakhar6672 3 жыл бұрын
Live data ki value delete kaise kre?
@CheezyCode
@CheezyCode 3 жыл бұрын
aisa karenge kyo ?? just remove the observer
@rohitjakhar6672
@rohitjakhar6672 3 жыл бұрын
@@CheezyCode same ui me 2 resources se value dikhank ho To agr ek resources ki value null ho to wo old wale ki dikha deta hain to pahle usko delete karna padta hain
@hammadyousuf5349
@hammadyousuf5349 3 жыл бұрын
any other videos comming
@CheezyCode
@CheezyCode 3 жыл бұрын
Yes today
@KaranCode
@KaranCode 2 жыл бұрын
👏👏👏👏👏
@arshadqureshi5997
@arshadqureshi5997 3 жыл бұрын
Good Video but make in java
@CheezyCode
@CheezyCode 3 жыл бұрын
Bro now Kotlin will be used everywhere for all new things in Android. It will be better you switch to Kotlin.
@kishorramani007
@kishorramani007 3 жыл бұрын
Humne factsLiveDataObject ko private banaya, kyoki we think that factsLiveDataObject ko koi change kar sakta hai... Agar data change karna hai toh koi bhi updateLiveData se bhi kar sakta hai... Jyada kuch pata nahi chala... 🤔
@CheezyCode
@CheezyCode 3 жыл бұрын
Update live data mei logic likh skte ho ko value update karni h ki nahi...getter and setter wali baat hai... cheezein encapsulate hogayi h
@URKCSKaushikSaha
@URKCSKaushikSaha 3 жыл бұрын
bhai ap itna fast keu bolte hoo...as if ap rap kar rahe ho...
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 913 М.
LiveData Explained - Android Architecture Component | Tutorial
12:12
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН