Kotlin StateFlow Tutorial | StateFlow vs LiveData vs SharedFlow | CheezyCode - Hindi

Поделиться
HTML-код
  • Опубликовано: 9 янв 2025

Комментарии • 83

  • @abdulbasitbhatti2489
    @abdulbasitbhatti2489 9 месяцев назад +1

    I just completed this Flows series. Thank you CheezyCode for providing such straightforward and clear explanation videos and tutorials. I am an Android Developer and whenever I need to learn something new, I visit CheezyCode first. You have helped me a lot in my Android development journey. Thank you, again.

  • @khyatichavda415
    @khyatichavda415 4 месяца назад

    Great tutorial and channel I had a career break of 6yr and while learning kotlin corutine and flows amazing explanation help me a lot thank you so much 🙏

  • @saqiblatif786
    @saqiblatif786 6 месяцев назад

    Nice instructor.
    Hr topic clarity k sth smjhaya hai.

  • @mobile-alchemist
    @mobile-alchemist Год назад

    beautiful series of 6 vedios short, simple & crystal clear, Thnks sir🙏

  • @arsalansadar3113
    @arsalansadar3113 Месяц назад

    I can say just amazing explain by Cheezy code

  • @deepakpitaliya8932
    @deepakpitaliya8932 4 месяца назад

    Just completed whole series. Great tutorial. Thank you for such clear and concise explanations.

    • @CheezyCode
      @CheezyCode  4 месяца назад

      You're very welcome!

  • @shubhamshinde-lt7hr
    @shubhamshinde-lt7hr 2 года назад +3

    Thank you for making this playlist
    You've made flow simple 😊

  • @ihareshvaghela
    @ihareshvaghela 10 месяцев назад

    I appreciate your clear communication. Thanks!

  • @DnyaneshwarMahajan-e8b
    @DnyaneshwarMahajan-e8b Год назад

    Excellent, Outstanding. You made Flow simple!!

  • @rocksolid111
    @rocksolid111 Год назад

    Simple and sweet explanation.... with no bakhwas like angragi videos.😄

  • @ShortBits786
    @ShortBits786 2 месяца назад

    sir last mhe konsa song hai ? completed your series one of best channel for android best teacher i seen in my life thank you sir without you i will be like a computer sirf rata marke concept implement karta kabhi samj nahi ata y it used what it solves , Thank you sir ur best Teacher ,can you mention your linkedin profile

  • @sumeetchawla3545
    @sumeetchawla3545 2 года назад +1

    Explained in very simple terms. Great !!! Keep it up !

  • @rishabhgarg6692
    @rishabhgarg6692 2 года назад

    Best, simple clear, Thank you for such quality contents

  • @rizwansworld
    @rizwansworld 5 месяцев назад

    Thanks man. Really well explained!

  • @kishorramani007
    @kishorramani007 Год назад

    Timimg at 5:38, shows that item ("5") collected before emitting why this output?

  • @utkarshkumar1080
    @utkarshkumar1080 2 года назад +4

    Sir Maja hi aa gaya you are really confidence booster 😍😍😍😍😍,Sir aur videos bachi hai is playlist me ? I am preparing for interview in top MNC is this playlist enough ? and Sir one more thing aap kaha job karte ho ?

    • @CheezyCode
      @CheezyCode  2 года назад +3

      thank you...interview ke liye I guess kaafi hai ...bas MVVM mei integrate aur karlo...uspe video dalni hai thoda samay lenge...but jaldi he upload karta hu....ek US based company hai...Noida mei dev center....

    • @utkarshkumar1080
      @utkarshkumar1080 2 года назад

      @@CheezyCode Ok Sir thanks for the guidance 🥰

  • @mysuperemecy
    @mysuperemecy Год назад

    Best explanation ever

  • @2chotti
    @2chotti 6 месяцев назад

    Brilliant videos. Thank you so much

  • @iiitsricity3171
    @iiitsricity3171 2 года назад

    Tussi great ho aap🙇

  • @basavarajashok
    @basavarajashok 2 года назад

    Simple and clear . Thank u ☺️

  • @no.bakwas
    @no.bakwas 6 месяцев назад +1

    The difference in last 10:21 , isn't it between flow and live data rather than state flow and live data??

    • @CheezyCode
      @CheezyCode  6 месяцев назад

      State Flow is a flow?

    • @no.bakwas
      @no.bakwas 6 месяцев назад

      @@CheezyCode yes, stateFlow is a flow. I am saying you said and labelled the difference as 'LIVEDATA VS STATEFLOW' when it doesn't contain any particular property of stateFlow, all difference are of flow. Label ' livedata vs flow' is more accurate imo

    • @CheezyCode
      @CheezyCode  6 месяцев назад

      Yes... generally people use stateflow to replace livedata that is why I have written this.

    • @no.bakwas
      @no.bakwas 6 месяцев назад

      @@CheezyCode ok understood.
      Nice video btw. All of your videos are really helpful. Thank you very much for creating.

  • @naveennaik1889
    @naveennaik1889 2 года назад +2

    Thanks for the video , Its really helpfull , I just wanted to know is there any videos coming on these flows ??? i means is der any major concepts remaining in this flows section ??? coz i am preparing for interview on ur video basis . . . major topics

    • @CheezyCode
      @CheezyCode  2 года назад +5

      Majorly yehi hoga...baaki operators he h...uski koi limit nahi...concepts isse deep mei nahi puchne chaiye interview mei

  • @RAJSINGH-mr7hq
    @RAJSINGH-mr7hq 2 года назад

    Superb sir 👌 👏

  • @kishorramani007
    @kishorramani007 Год назад

    Thanks for this series :)

  • @56omkarkalel86
    @56omkarkalel86 2 года назад

    Mind blowing sir 🔥🔥🔥❤️❤️❤️

  • @anupsarkar3063
    @anupsarkar3063 2 года назад

    very nice and well explained...

  • @aruaru1801
    @aruaru1801 2 года назад +1

    Sir, plz make a video on Unit testing Mockito, JUnit, Roboelectric

  • @vikrantsaini437
    @vikrantsaini437 Год назад

    Explanation at the easiest level! However, I have a question here.
    When explaining difference between LiveData and StateFlow, you said that Livedata is lifecycle aware but if we are collecting a flow inside a coroutine scope then does that means StateFlow is also lifecycle aware, as coroutine also has a lifecycle scope?

    • @CheezyCode
      @CheezyCode  Год назад +1

      Not directly aware but linked via coroutine scope

  • @RitikaGuleria-o1y
    @RitikaGuleria-o1y Год назад

    nice content sir

  • @arsalanjibran3138
    @arsalanjibran3138 2 года назад

    At 6:35 what if we used replay in sharedflow will it collect since emit has stopped after 6 ms.

    • @CheezyCode
      @CheezyCode  2 года назад

      yes that's why it is a special type of Shared Flow...isme ek concept aur hai - Conflation ka - i.e. it will keep the latest value

    • @CheezyCode
      @CheezyCode  2 года назад +1

      Good question hai waise....that means you understood the concepts well... 🤘

    • @arsalanjibran3138
      @arsalanjibran3138 2 года назад

      @@CheezyCode Also coroutineScope does not have lifecycle so what happens if app is closed, will it still work or stop.

    • @CheezyCode
      @CheezyCode  2 года назад +1

      Scopes hote hai coroutines ke...like viewmodel scope and lifecycle Scope... activity destroy hogi toh lifecycle Scope bhi destroy hojayega...uske andar ka flow bhi....app close pe activity destroy nahi hui hogi toh maintain hona chaiye

    • @arsalanjibran3138
      @arsalanjibran3138 2 года назад

      @@CheezyCode let me rephrase it, what is scope of "CoroutineScope(...).launch " this piece of code . I want to know scope of this. The lifecycle,global scopes I understood but scope of code in quotation I do not know

  • @tusharvarankar6553
    @tusharvarankar6553 Год назад

    Good explanation of flow...thank you for this smooth understandable video....can you make a video for Android HAL (camera, audio, media player,BLe etc) concept please.

  • @ZeeshanAslam-k7v
    @ZeeshanAslam-k7v Год назад

    Thank you so much for the lovely tutorials. You explain very nicely.
    I have a question If we use SharedFlow with replay 1 then Isn't it the same as StateFlow?

    • @CheezyCode
      @CheezyCode  Год назад

      State Flow will provide you only current state. But let's say as you subscribe, emitter starts emitting...you will be getting 2 values at the same time(one because of replay and other one will be currently emitted value)...but with state Flow you will only get 1 value and that will be the latest one no matter what.
      Semantic difference hai...stateflow means flow having state

    • @CheezyCode
      @CheezyCode  Год назад

      Hope this helps 🤘🏻

    • @rexitspersonal8353
      @rexitspersonal8353 Год назад

      @@CheezyCode okey it means sharedFlow is not giving us latest value where as stateFlow is giving latest value right ?

  • @temposharma1220
    @temposharma1220 Год назад

    If I need to return non-stream kind of data like api response of any profile, so should I use flow or simple suspend function?

  • @sekharsudhansu8176
    @sekharsudhansu8176 2 года назад

    Bhai Shared flow to samajh main aagaya and State flow bhi but State Flow ka kuch real world example miljata to samajhne main asani hoti aaur, jaise aapne shared flow ka example deke samjhaya cinema hall wala.. waisa kuch real world scenario main or else programming main kab use kare shared flow wo jan.na hai

    • @CheezyCode
      @CheezyCode  2 года назад +1

      Jahan pe livedata use kar rahe ho...waha pe stateflow se replace kardo...notes wali app mei replace karke dikhata hu jaldi he

    • @sekharsudhansu8176
      @sekharsudhansu8176 2 года назад

      @@CheezyCode Sahi hai bhai just post kiya aapne, dekh raha hun StateFlow vs LiveData. Notes app

  • @androiddev7267
    @androiddev7267 2 года назад +1

    was this last video of flows series?

    • @AkashJhaDDN
      @AkashJhaDDN 2 года назад

      Inhone number nai daala 1 2 karke mera v bhatkao ho gaya tha 😅

    • @CheezyCode
      @CheezyCode  2 года назад +2

      Playlist h 😂 jitne hai yehi h....

    • @androiddev7267
      @androiddev7267 2 года назад

      @@CheezyCode ok sir

  • @anitavaghasiya369
    @anitavaghasiya369 2 года назад

    hello sir, what is Rxjava??
    i m confused for Rxkava n liveData both are same ya different??

    • @CheezyCode
      @CheezyCode  2 года назад +1

      RxJava - duniya hai poori..
      LiveData - uska minuscule version hai...RxJava ka ek concept hai uska chota sa implementation hai....

  • @muhammadirfanrajput8400
    @muhammadirfanrajput8400 2 года назад

    Very good

  • @tusharjain7626
    @tusharjain7626 Год назад

    Personal note: stateFlow vs livedata

  • @Mohit-gb9dv
    @Mohit-gb9dv 2 года назад

    /* different topics */
    Sir , I have some data which I want to use in my entire app but dont want to use bundle or put extra method to send data to different activities or fragment
    Is there any way to do that please tell me

    • @CheezyCode
      @CheezyCode  2 года назад +1

      you can keep them in application object - but risky hoga toh keep it as singleton...make sure you don't pollute the global object...warna soch ban jaati hai baad mei ki sab kuch global pe he rakhdo....jetpack data store can also be used , create a wrapper around it to get the data from that...single place of getting and storing the object.

    • @CoCAttackArena
      @CoCAttackArena 2 года назад

      @@CheezyCode sir shared preference nahi use kar sakte kya??

  • @rishikeshsingh9946
    @rishikeshsingh9946 2 года назад

    Thanku Sir....Awesome....

  • @yuviyboy3388
    @yuviyboy3388 2 года назад

    Thanks Sir

  • @NiteshSingh-bv9lu
    @NiteshSingh-bv9lu 2 года назад

    good video. but i want help in socket tcp client server so can you help me here

    • @CheezyCode
      @CheezyCode  2 года назад

      ?

    • @NiteshSingh-bv9lu
      @NiteshSingh-bv9lu 2 года назад

      @@CheezyCode how to send data from our app to laptop?

    • @CheezyCode
      @CheezyCode  2 года назад

      Via bluetooth karlo..socket tak mat pahocho...

    • @NiteshSingh-bv9lu
      @NiteshSingh-bv9lu 2 года назад

      @@CheezyCode haa but wapas data socket server se lenaa bhi hai naa like TCP client or TCP server dono use krnaa hai.ye chij Bluetooth me kese hogaa

  • @vikassharma-by4kw
    @vikassharma-by4kw Год назад

    बहुत बढ़िया, साला कन्फ्यूज कर रखा था