SharedPreferences - How to Save & Retrieve Data Android Studio | Beginner's Guide

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

КОМЕНТАРІ • 86

  • @Ben_obrien
    @Ben_obrien  4 роки тому +12

    If you guys have any requests on what tutorials you want to see, just leave a comment below! Thanks for watching :)

    • @lakshmikanthgangaramaiah5249
      @lakshmikanthgangaramaiah5249 4 роки тому

      Could u please use this concept to save the checkbox checked? please make a video on that

    • @thevass3797
      @thevass3797 4 роки тому

      @@lakshmikanthgangaramaiah5249 you can check if the checkbox is checked and when it is checked you can put the shared preference code in it. Simple as that.

    • @ishitaagrawal6848
      @ishitaagrawal6848 4 роки тому

      Please checkout the CS50's android Pokdex project. I have been stuck on it since 1 week and I just don't understand from the documentation. Please make a tutorial on that !!!!!

    • @crunchraven000
      @crunchraven000 3 роки тому

      Hello dear friend. Do you have any tutorial on how i can have preferences by user? i am using xampp to store the users in users table, then i want another table for lets say results, so a signed in user can choose from 1 to 5 and got stored to the table results by user id

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

      @@lakshmikanthgangaramaiah5249 did you know how to do it ?

  • @shahinjamader9121
    @shahinjamader9121 8 місяців тому +1

    Thank you so much, Sir!
    Your tutorial save my another 6 hour.

  • @saqibmasood6778
    @saqibmasood6778 4 роки тому +7

    A good tutorial, explaining both read and write on different activities, which is rare. Thanks a lot.
    Also just to make it simpler for us newbies you may add a new activity 'OtherPage' from the conetxt menu rather than the process you adopted.

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

    What pisses me off about this video is you taught me in just over 8 minutes what I have been trying to acquire from my professor for 2+ days and spending thousands of dollars for. Thank you.

  • @superrv0023
    @superrv0023 3 роки тому +5

    Thank you so much. I have been searching about this for days😭😭

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

    Old Video Still saved me from due date of my thesis! Super Thank You

  • @le0nz
    @le0nz 4 роки тому +7

    You are the OG, Thanks for this tutorial!

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

    Thank you for this video and for gracefully teaching me what the android docs couldn't

  • @JasTheGoose88
    @JasTheGoose88 3 роки тому +2

    my right ear really enjoyed this video

  • @EvycClips
    @EvycClips 4 роки тому +5

    great video for understandable a share preferences in android studio keep it up :)

  • @swalloich
    @swalloich 3 роки тому

    I scoured documentation, and stack overflow posts with little results. This video helped tremendously, thanks m8.

  • @immortalgaming617
    @immortalgaming617 3 роки тому

    Thank you bro... Best tutor n tutorial on Shared Preference.... exactly what I looked for my Sms forward app! Thanks a ton

  • @zakiewatin3219
    @zakiewatin3219 3 роки тому +1

    SharedPreferences are loading my default value instead of saved value. I have everything correct. My SharedPrefs save properly in one activity, but the values don't save at all in other activities.

  • @Julia-us5wv
    @Julia-us5wv 4 роки тому +1

    It's really clear the way you explain and it's useful for me. Thanks !!

  • @Hugo-jr8im
    @Hugo-jr8im 3 роки тому +1

    My right ear liked this video

  • @GurpreetSingh-kd4hi
    @GurpreetSingh-kd4hi 2 роки тому

    This video is awesome, liked and subscribed !

  • @Defense89
    @Defense89 3 роки тому

    awesome tutorial , how can we read all saved stuff ? i have a tic tac toe project to do , first page is a choose player list and an option to add a player , each player score are saved on shared preference, you then must choose an image to play tic tac toe default are X and O. finnaly once the 2 player has chose , tic tac toe game can start. when a player wins scores are updated on shared preferences. but how do you read all shared preference and show them as a choice to click.

  • @salmaxxiii
    @salmaxxiii 4 роки тому +3

    this was very helpful, thank you ♥

  • @aayushmishra675
    @aayushmishra675 3 роки тому +2

    left ear: am i joke to you?

  • @جبهةلبنانية
    @جبهةلبنانية 2 роки тому

    I really loved your explanation!!!!!!!! Please make moreeee!

  • @venuskandas1235
    @venuskandas1235 4 роки тому

    Very helpful , looking forward to more of your videos!!!!!

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

    Is there a way to save onto the shared preference without having the button, like once we put data into the field, it would just stay there automatically?

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

    Thank you so much for the clear and easy to understand instructions :)

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

    Sir background video recorder app can store user record video....

  • @shortmoviecut
    @shortmoviecut 4 роки тому

    In RecyclerView there is a cardView and in it, there are multiple checkBoxes. If i select and leave app and come back to app again, those selected checkBoxes must be selected. Can you help me with that bro?

  • @XandarLake1
    @XandarLake1 3 роки тому

    Hi, is there a way to store those data after APP is close and once it gets open again we still have the same data written. Thnx.

  • @arkasaha2156
    @arkasaha2156 4 роки тому

    Just needed this 😀
    ❤️❤️
    Thanks.🙏

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

    Yo man. The guide is good, but I have a problem. Android studio shows that there are zero errors in the code, but when I run the app I get a crash. Can you help me with this?

  • @JarJarBricks01
    @JarJarBricks01 3 роки тому

    You saved my life man. Many thanks!

  • @sahithdandakadiyala7080
    @sahithdandakadiyala7080 4 роки тому

    Great work buddy, you deserve more subs.

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

    i have doubt which language you have used like kotlin or java cause i am a new learner

  • @dubstick4335
    @dubstick4335 4 роки тому +1

    Hi man, nice video! I got one question tho. Is there a way that the value on the next page changes whenever the user fills in a new value? Now it only saves the first one.

  • @crunchraven000
    @crunchraven000 3 роки тому

    Hello dear friend. Do you have any tutorial on how i can have preferences by user? i am using xampp to store the users in users table, then i want another table for lets say results, so a signed in user can choose from 1 to 5 and got stored to the table results by user id

  • @jupiterx294
    @jupiterx294 4 роки тому +1

    Thanks for the vid. If we restart the app will the name still be there if now can you tell me how to do that?

    • @aswing1480
      @aswing1480 4 роки тому

      It will be saved even after the app is closed

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

    is this working on a multiple data?

  • @mr.RAND5584
    @mr.RAND5584 3 роки тому

    Can we put the sharedpreferences in a list? Or an array.

  • @felixwong4992
    @felixwong4992 3 роки тому

    Thank you. I'm still learning and it was helpful!❤

  • @AliFX
    @AliFX 4 роки тому

    Awesome video man really great for api token authentication!!

  • @virusehwag9562
    @virusehwag9562 4 роки тому

    Very nice explanation brother
    Thank you.

  • @woonie3134
    @woonie3134 3 роки тому

    How can we edit after we saved??

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

    why do i not have the function getText()

  • @tm1
    @tm1 4 роки тому +1

    It's not working man it shows shared preference app stopped working

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

    Thank you, your video was very helpful

  • @vasilbtg
    @vasilbtg 4 роки тому

    You deserve more subs!

  • @pakblogger6025
    @pakblogger6025 4 роки тому

    Can you make shared preferences Part 2 because the input you printed on otherpage.xml will always show there unless you enter the new values... and by clicking on save button it should show us the values we saved... the video was quite easy to understand

    • @timelesstalestrails
      @timelesstalestrails 4 роки тому

      do you have a tutorial on finding the number of records after adding a new column in sugar orm, kindly help.

  • @ashishkumar-eo1tz
    @ashishkumar-eo1tz 2 роки тому

    Thanks buddy you made my day

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

    You are AWESOMEMOUS!!! Thank You!

  • @wellingtonrocha6802
    @wellingtonrocha6802 3 роки тому

    perfect tutorial!! Thanks!!

  • @pakblogger6025
    @pakblogger6025 4 роки тому

    and also tell us how to delete and update the values we saved
    Much appreciated...

  • @hemant.r3499
    @hemant.r3499 2 роки тому

    Not working application is crashing

  • @goobar
    @goobar 4 роки тому

    Nice work 👍👍

  • @carlosaguirre746
    @carlosaguirre746 3 роки тому

    Thanks!! It's so userful!! 😁

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

    very useful, thank you!

  • @87nehal
    @87nehal 4 роки тому

    Not working everytime gives default value

  • @romualdgrandin
    @romualdgrandin 3 роки тому

    Thanks you for this tutorial.. Do you can to help me for an example with to getInt() and putInt() please ;)

  • @bradcheng1203
    @bradcheng1203 3 роки тому

    Thanks for your videos.

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

    thank you Sir😇

  • @budyfriend_code
    @budyfriend_code 4 роки тому +1

    very good

    • @Ben_obrien
      @Ben_obrien  4 роки тому

      Thanks man, much appreciated 😊 subscribe for more!

  • @LetrixAR
    @LetrixAR 4 роки тому +3

    My left ear is jealous

    • @mryup6100
      @mryup6100 3 роки тому

      same, they are thinking of leaving me

  • @nikuzair3178
    @nikuzair3178 3 роки тому

    THANK YOU SO MUCH!!!!!!!

  • @randy4ii411
    @randy4ii411 3 роки тому

    Thank you sir

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

    Thanks Ben!!!

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

    its just like player prefs in unity

  • @ayurisqi3481
    @ayurisqi3481 4 роки тому

    Thank you

  • @abhirampuranik228
    @abhirampuranik228 3 роки тому

    Thanks :)

  • @subramanianchenniappan4059
    @subramanianchenniappan4059 4 роки тому

    Thanks bro

  • @uttu_aka_freakyallahabad6406
    @uttu_aka_freakyallahabad6406 4 роки тому

    Actually I am new and I want to make social media app can you please help me out

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

    💕❤️

  • @MrCode1
    @MrCode1 4 роки тому

    Made a video about encrypted shared preferences, check it out :)

    • @Ben_obrien
      @Ben_obrien  4 роки тому

      Will do! Excited to see it

  • @pervyshrimp2860
    @pervyshrimp2860 4 роки тому

    dude you saved me thank you so much

  • @mohsenjavaher7782
    @mohsenjavaher7782 4 місяці тому

    thank you