SharedPreferences - How to Save & Retrieve Data Android Studio | Beginner's Guide
HTML-код
- Опубликовано: 19 июн 2024
- Hello fellow Android Developers! Today I will show you how to use Shared Preferences in Android to store data. We will be using a SharedPreferences.Editor to save multiple String values, but keep in mind that you can also save other data types like Integers, Floats, Booleans or Long variables.
This tutorial is suitable for beginners, and I take you step by step through the whole process :)
Any questions? Feel free to ask below!
Some Keywords for easy navigation for newbies:
android developer website
how to android development
android os application
splash screen android example
android splash screen
splash page website
what is the newest android os
Keywords:
how to make splash screen
how to make splash screen android
android splash screen
splash screen in android studio
android studio
splash screen using android studio
splash screen in android app
android studio
android xml design
xml animation
android gui
xml design
splash screen
transition android
material design
smooth splash screen
Hope you enjoyed the tutorial!
Don't forget to subscribe :) Наука
If you guys have any requests on what tutorials you want to see, just leave a comment below! Thanks for watching :)
Could u please use this concept to save the checkbox checked? please make a video on that
@@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.
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 !!!!!
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
@@lakshmikanthgangaramaiah5249 did you know how to do it ?
Thank you so much, Sir!
Your tutorial save my another 6 hour.
Thank you so much. I have been searching about this for days😭😭
Thank you for this video and for gracefully teaching me what the android docs couldn't
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.
It's really clear the way you explain and it's useful for me. Thanks !!
Thank you bro... Best tutor n tutorial on Shared Preference.... exactly what I looked for my Sms forward app! Thanks a ton
Thank you so much for the clear and easy to understand instructions :)
Thank you. I'm still learning and it was helpful!❤
I scoured documentation, and stack overflow posts with little results. This video helped tremendously, thanks m8.
great video for understandable a share preferences in android studio keep it up :)
You are the OG, Thanks for this tutorial!
Happy to help!
Just needed this 😀
❤️❤️
Thanks.🙏
Very helpful , looking forward to more of your videos!!!!!
You saved my life man. Many thanks!
this was very helpful, thank you ♥
Old Video Still saved me from due date of my thesis! Super Thank You
Glad to help, best of luck
This video is awesome, liked and subscribed !
I really loved your explanation!!!!!!!! Please make moreeee!
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.
Thank you, your video was very helpful
Awesome video man really great for api token authentication!!
my right ear really enjoyed this video
Great work buddy, you deserve more subs.
You are AWESOMEMOUS!!! Thank You!
perfect tutorial!! Thanks!!
Thanks buddy you made my day
Thanks!! It's so userful!! 😁
dude you saved me thank you so much
Very nice explanation brother
Thank you.
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.
welcome to university friend
very useful, thank you!
Thanks for your videos.
You deserve more subs!
My right ear liked this video
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.
THANK YOU SO MUCH!!!!!!!
Thanks Ben!!!
thank you Sir😇
Thanks :)
Thank you sir
Nice work 👍👍
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
Can we put the sharedpreferences in a list? Or an array.
Thank you
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?
Thanks bro
Sir background video recorder app can store user record video....
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.
Thanks you for this tutorial.. Do you can to help me for an example with to getInt() and putInt() please ;)
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?
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
do you have a tutorial on finding the number of records after adding a new column in sugar orm, kindly help.
and also tell us how to delete and update the values we saved
Much appreciated...
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.
i have doubt which language you have used like kotlin or java cause i am a new learner
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?
It will be saved even after the app is closed
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?
is this working on a multiple data?
very good
Thanks man, much appreciated 😊 subscribe for more!
left ear: am i joke to you?
💕❤️
How can we edit after we saved??
why do i not have the function getText()
its just like player prefs in unity
Not working application is crashing
Not working everytime gives default value
My left ear is jealous
same, they are thinking of leaving me
It's not working man it shows shared preference app stopped working
Can you send the code here to help you?
Actually I am new and I want to make social media app can you please help me out
Made a video about encrypted shared preferences, check it out :)
Will do! Excited to see it