Preferences DataStore in Jetpack Compose | Android | Forget about SharedPreferences

Поділитися
Вставка
  • Опубліковано 15 гру 2024

КОМЕНТАРІ • 43

  • @codegiz
    @codegiz 2 роки тому +4

    The music is so good, I don't know whether to code along or to dance along.

  • @debasishghoshsays
    @debasishghoshsays Рік тому +2

    Bro u r a god! Please continue making these stuff

    • @DeveloperChunk
      @DeveloperChunk  Рік тому +1

      Thank you so much 🤗 more videos are coming soon.

  • @scanskynero3083
    @scanskynero3083 Рік тому +6

    thank you. Phil Lackner's guide (while understandable) was too outdated and the official android codelab one was wayy too complicated.

  • @khaxbiker
    @khaxbiker Рік тому +1

    Great and nice example, thanks a lot !

  • @WalwRafii
    @WalwRafii 3 місяці тому +1

    Thank you, great video

  • @sieleemmanuel1631
    @sieleemmanuel1631 2 роки тому +1

    Brief and to the point explanation. Thank you

  • @EricLouisYoung
    @EricLouisYoung Рік тому +1

    The ONLY correct and complete tutorial for this on the internet.

  • @33t00p
    @33t00p Рік тому +1

    Great tutorial. Thanks a lot.

  • @klondikexx2831
    @klondikexx2831 2 роки тому

    This is very good. Easy to understand. I hope you make more easy to understand examples with jetpack compose. Maybe also a bigger project where you talk with voice :-)

    • @DeveloperChunk
      @DeveloperChunk  2 роки тому +1

      Thank you so much 🥰. I am planning to make some projects with my voice and you will see some fresh content on jetpack compose very soon.

    • @michaelchristensen8350
      @michaelchristensen8350 2 роки тому

      @@DeveloperChunk Thats great to hear. I will look out for it

  • @tora3492
    @tora3492 Рік тому +1

    Thanks Dudeeeee !!!!!

  • @johanngeisser6109
    @johanngeisser6109 Рік тому +1

    Thanks for this, it was very useful

  • @TuLam-ey5ue
    @TuLam-ey5ue 10 місяців тому +1

    Thank you very much

  • @tora3492
    @tora3492 Рік тому

    Bruhhh
    The data is not staying when I remove the app from memory.
    Again starting from empty string/0.
    How do I fix this.

    • @DeveloperChunk
      @DeveloperChunk  Рік тому +1

      Try to run the app in real device, there are some changes that emulator may have some bugs, if still the problem is occurring then please check the code once again also you can access the GitHub code for reference.

  • @1PlayGam3sChannel
    @1PlayGam3sChannel 2 роки тому

    how to not get the savedEmail as an state object, because I try to login automatically by saved credentials but for some reason the method gets called multiple times which results in that the next screen will open multiple time...

    • @DeveloperChunk
      @DeveloperChunk  2 роки тому

      You can create a Variable in ViewModel which is not a mutable state and save the recived savedEmail in that variable. Now you can use that variable.

    • @1PlayGam3sChannel
      @1PlayGam3sChannel 2 роки тому +1

      @@DeveloperChunk will try, thanks!

  • @prefact
    @prefact 2 роки тому

    nice and easy to follow, Thanks!!

  • @josephescobar6904
    @josephescobar6904 Рік тому +1

    How can i save an array using dataStore?

    • @DeveloperChunk
      @DeveloperChunk  Рік тому

      There are options on internet to achieve array in shared preferences but they are complicated, if you ask me then I would prefer you to convert the array to string and save it and then retrieve the string and convert it back to array. Thank you and ask me if you got any problem

  • @thuongpham6605
    @thuongpham6605 2 роки тому

    how to restart textfield still get the value savedEmail ???

    • @DeveloperChunk
      @DeveloperChunk  2 роки тому

      You don't need to restart textfield, jetpack compose will automatically recompose the composable fields like textfield when ever there is change in the text field. If you are using Preference Data Store then the value will be stored and you can access the value even you restart the app. I hope it may help you and if have some problem about it the feel free to ask 😊

    • @thuongpham6605
      @thuongpham6605 2 роки тому

      I want on restart the value at textfield is still savedData.
      For example, the "Remember me" section at the application's login screen
      Can you do example about check box "remember account" in login screen ???

    • @DeveloperChunk
      @DeveloperChunk  2 роки тому

      @@thuongpham6605 it is simple you can create a check box remember me and if it is clicked then save the text field in Preference Data Store and if the remember me check box is not clicked then simply do not save the value in Preference Data Store. I hope it will help you 😊

  • @kontea2065
    @kontea2065 Рік тому +1

    GREAT..!!!

    • @DeveloperChunk
      @DeveloperChunk  Рік тому

      Thank you so much 🥰 I am glad it helped you

  • @mr.preston0783
    @mr.preston0783 2 роки тому +1

    Muestra como hacer anuncios en Jetpack Compose

    • @DeveloperChunk
      @DeveloperChunk  2 роки тому +1

      muchas gracias por tu sugerencia Intentaré hacer un video usando Google ADMob

  • @eganathan.r
    @eganathan.r 2 роки тому +1

    Thank you 💌

  • @mohamed-tyb
    @mohamed-tyb Рік тому

    you are just write how we can understand

    • @DeveloperChunk
      @DeveloperChunk  Рік тому

      I know and I am sorry for that. The Tutorial was made for just to demonstrate the working of Preferences Datastore in Jetpack Compose. And at that time I use to upload videos without audio explantation so so sorry for the inconvenience. To understand the topic better here is a article by Mansi Shah on Medium: medium.com/jetpack-composers/android-jetpack-datastore-5dfdfea4a3ea
      Thank You 🤗