SAVING DATA IN SHARED PREFERENCES - Android Fundamentals

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ต.ค. 2024

ความคิดเห็น • 47

  • @PrestonRahim
    @PrestonRahim 3 ปีที่แล้ว +22

    Thank god, finally someone who talks through the meaning and purpose of each line and argument. Excellent work, you're helping me pass senior design

  • @stasleonov5196
    @stasleonov5196 ปีที่แล้ว +2

    Philipp, you are best.I really envy your ability to explain complex things easily.

  • @nhatphan4176
    @nhatphan4176 4 ปีที่แล้ว +1

    This video is cleanly. Thanks for make this.

  • @harshpratapsingh1638
    @harshpratapsingh1638 2 ปีที่แล้ว

    After watching so much tutorials i finally undestand thanks bro keep making such a helpful content

  • @silentsage9569
    @silentsage9569 3 ปีที่แล้ว

    Great tutorial man, thanks for this. Easy and straight to the point

  • @mohitmahajan1947
    @mohitmahajan1947 4 ปีที่แล้ว +3

    perfect explanation, thanks

  • @sharanpreetchadha5281
    @sharanpreetchadha5281 2 ปีที่แล้ว

    Easy to understand and great

  • @prithviravi2356
    @prithviravi2356 3 ปีที่แล้ว

    Thanks for this tutorial! Keep it going

  • @marc988
    @marc988 2 ปีที่แล้ว

    Nice explanation! And if I'm not wrong, this can be used to save draft too

  • @favuraki
    @favuraki ปีที่แล้ว

    i wanna a tut about using shared preferences for to-do list that you made

  • @mohamednashat4478
    @mohamednashat4478 2 ปีที่แล้ว

    exactly your are amazing one

  • @KaanFrat
    @KaanFrat 4 ปีที่แล้ว

    Cool video, thanks mate. I have a question. I want to store arraylist of a user. I used gson but I didn't print. How can I do?

  • @yutaitadori7318
    @yutaitadori7318 3 ปีที่แล้ว

    It's awesome already 🙂

  • @ajaygalagali5963
    @ajaygalagali5963 4 ปีที่แล้ว

    Thanks a lot.

  • @hrc2514
    @hrc2514 ปีที่แล้ว

    Shared pref is used to save small king of user change setting in your app like : changing the theme to (dark) default is (white) like this am correct

  • @woonie3134
    @woonie3134 3 ปีที่แล้ว +2

    Lovely tutorial. I just wonder if there is a way to start the app with the data loaded without pressing load! Just loaded by default. Anyone could help me with this? I have load clear and save and would like my app to have it loaded by default but I cannnot seem to make it

    • @chimezieorji-unegbu7110
      @chimezieorji-unegbu7110 2 ปีที่แล้ว +2

      I believe you must have gotten a response to this. In instances like this, call the method in onCreate, then you will not need and event listener to invoke the call

  • @likatest7718
    @likatest7718 10 หลายเดือนก่อน

    How about saving my wallpaper image as bitmap in shared storage?

  • @aswinpashok5224
    @aswinpashok5224 2 ปีที่แล้ว

    Is reading/writing shared pref ok on main thread? Should we care about that?

  • @TheImaginativeSachin
    @TheImaginativeSachin 2 ปีที่แล้ว

    Hey there what if I want to load the shared preferences without the load button and anything and directly load the values in screen?Right after starting?
    What do i do then?

    • @diamantto
      @diamantto ปีที่แล้ว +1

      Create the function and paste the code he wrote in "OnClickListener". Then call the function in the onCreate()

  • @guy1407
    @guy1407 4 ปีที่แล้ว

    many thanks for your efforts. Will you make a demo for database read/write ? (like you mensioned at the end of this video (10:50)?

    • @PhilippLackner
      @PhilippLackner  4 ปีที่แล้ว +2

      I showed this many times in my project Playlists like shopping list app, mvvm news app, running app

  • @뵴키
    @뵴키 2 ปีที่แล้ว

    Thank You for the great lesson🤗🤗
    But I have One questin which is that sharedPreference is not able to be used in fragment ..
    is there any solution for this??

  • @KotlinBek
    @KotlinBek 3 ปีที่แล้ว

    thanks man

  • @NabeelHaider
    @NabeelHaider 3 ปีที่แล้ว

    Why there is warning for this
    SharedPreferences.edit() without a corresponding commit() or apply() call
    ??? Please tell...

  • @mohitmahajan1947
    @mohitmahajan1947 4 ปีที่แล้ว +1

    On NULL values with those '?' and all. as I migrated from JAVA to Kotlin just because I was fed up solving these null pointer exceptions please share your knowledge regarding null values, pointers how to prevent app crash because of that for Kotlin

    • @PhilippLackner
      @PhilippLackner  4 ปีที่แล้ว +2

      Your Program won't crash in kotlin because of null pointer exception 😁 when a value can be null, and you access a property or function of it, you just use that '?' before to only execute that line if the value is not null

  • @iamfunny2155
    @iamfunny2155 3 ปีที่แล้ว

    Pls how to open permission for data collector of code in user's consent on Android studio

  • @tochukwuokey-munonye7884
    @tochukwuokey-munonye7884 4 ปีที่แล้ว

    Can someone use shared preference to pass information between fragments like intents.

    • @ajaygalagali5963
      @ajaygalagali5963 4 ปีที่แล้ว

      Yes. You can. But using intents is prefered

  • @yutaitadori7318
    @yutaitadori7318 3 ปีที่แล้ว

    GREAT

  • @randy4ii411
    @randy4ii411 ปีที่แล้ว

    I second Preston.

  • @ajinkyakumbhar595
    @ajinkyakumbhar595 4 ปีที่แล้ว

    How to save object in shared preferences ?? 😅😅

    • @PhilippLackner
      @PhilippLackner  4 ปีที่แล้ว +1

      You can parse it to json.. But normally you use databases for that

    • @chris_rb84
      @chris_rb84 4 ปีที่แล้ว

      AndroidDevs exactly!

  • @anbuselvanrocky
    @anbuselvanrocky 4 ปีที่แล้ว

    (Y) Love your way of teaching

    • @PhilippLackner
      @PhilippLackner  4 ปีที่แล้ว +1

      Glad to hear that!

    • @anbuselvanrocky
      @anbuselvanrocky 4 ปีที่แล้ว

      @@PhilippLackner Can you concentrate on the MVVM pattern with another realtime example which has login functionality like that..