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

Поделиться
HTML-код
  • Опубликовано: 23 ноя 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 ?

  • @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.

  • @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.

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

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

  • @shahinjamader9121
    @shahinjamader9121 8 месяцев назад +1

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

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

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

  • @superrv0023
    @superrv0023 3 года назад +5

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

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

    my right ear really enjoyed this video

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

    left ear: am i joke to you?

  • @le0nz
    @le0nz 4 года назад +7

    You are the OG, Thanks for this tutorial!

  • @swalloich
    @swalloich 3 года назад

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

  • @EvycClips
    @EvycClips 4 года назад +5

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

  • @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

  • @GurpreetSingh-kd4hi
    @GurpreetSingh-kd4hi 2 года назад

    This video is awesome, liked and subscribed !

  • @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.

  • @Hugo-jr8im
    @Hugo-jr8im 3 года назад +1

    My right ear liked this video

  • @جبهةلبنانية
    @جبهةلبنانية 2 года назад

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

  • @Julia-us5wv
    @Julia-us5wv 4 года назад +1

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

  • @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.

  • @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.

  • @venuskandas1235
    @venuskandas1235 4 года назад

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

  • @arkasaha2156
    @arkasaha2156 3 года назад

    Just needed this 😀
    ❤️❤️
    Thanks.🙏

  • @JarJarBricks01
    @JarJarBricks01 3 года назад

    You saved my life man. Many 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?

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

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

  • @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?

  • @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?

  • @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

  • @sahithdandakadiyala7080
    @sahithdandakadiyala7080 4 года назад

    Great work buddy, you deserve more subs.

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

    Thank you, your video was very helpful

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

    You are AWESOMEMOUS!!! Thank You!

  • @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.

  • @salmaxxiii
    @salmaxxiii 4 года назад +3

    this was very helpful, thank you ♥

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

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

  • @virusehwag9562
    @virusehwag9562 4 года назад

    Very nice explanation brother
    Thank you.

  • @AliFX
    @AliFX 4 года назад

    Awesome video man really great for api token authentication!!

  • @ashishkumar-eo1tz
    @ashishkumar-eo1tz 2 года назад

    Thanks buddy you made my day

  • @felixwong4992
    @felixwong4992 3 года назад

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

  • @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

  • @romualdgrandin
    @romualdgrandin 3 года назад

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

  • @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.

  • @mr.RAND5584
    @mr.RAND5584 3 года назад

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

  • @vasilbtg
    @vasilbtg 4 года назад

    You deserve more subs!

  • @pakblogger6025
    @pakblogger6025 4 года назад

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

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

    very useful, thank you!

  • @goobar
    @goobar 4 года назад

    Nice work 👍👍

  • @carlosaguirre746
    @carlosaguirre746 3 года назад

    Thanks!! It's so userful!! 😁

  • @wellingtonrocha6802
    @wellingtonrocha6802 3 года назад

    perfect tutorial!! Thanks!!

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

    Thanks for your videos.

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

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

  • @tm1
    @tm1 4 года назад +1

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

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

    is this working on a multiple data?

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

    Thanks Ben!!!

  • @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

  • @87nehal
    @87nehal 4 года назад

    Not working everytime gives default value

  • @woonie3134
    @woonie3134 3 года назад

    How can we edit after we saved??

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

    why do i not have the function getText()

  • @nikuzair3178
    @nikuzair3178 3 года назад

    THANK YOU SO MUCH!!!!!!!

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

    thank you Sir😇

  • @abhirampuranik228
    @abhirampuranik228 3 года назад

    Thanks :)

  • @randy4ii411
    @randy4ii411 3 года назад

    Thank you sir

  • @hemant.r3499
    @hemant.r3499 2 года назад

    Not working application is crashing

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

    its just like player prefs in unity

  • @subramanianchenniappan4059
    @subramanianchenniappan4059 4 года назад

    Thanks bro

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

    💕❤️

  • @ayurisqi3481
    @ayurisqi3481 4 года назад

    Thank you

  • @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

  • @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 3 года назад

    dude you saved me thank you so much

  • @mohsenjavaher7782
    @mohsenjavaher7782 3 месяца назад

    thank you