SAVING DATA IN SHARED PREFERENCES - Android Fundamentals

  Рет қаралды 39,223

Philipp Lackner

Philipp Lackner

Күн бұрын

In this video you will learn how to save and load data with shared preferences.
⭐ Get certificates for your future job
⭐ Save countless hours of time
⭐ 100% money back guarantee for 30 days
⭐ Become a professional Android developer now:
pl-coding.com/...
Regular Android tutorials on my Instagram: / philipplackner_official
Checkout my GitHub: github.com/phi...

Пікірлер: 47
@PrestonRahim
@PrestonRahim 3 жыл бұрын
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 Жыл бұрын
Philipp, you are best.I really envy your ability to explain complex things easily.
@nhatphan4176
@nhatphan4176 4 жыл бұрын
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
@marc988
@marc988 2 жыл бұрын
Nice explanation! And if I'm not wrong, this can be used to save draft too
@sharanpreetchadha5281
@sharanpreetchadha5281 2 жыл бұрын
Easy to understand and great
@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?
@prithviravi2356
@prithviravi2356 3 жыл бұрын
Thanks for this tutorial! Keep it going
@뵴키
@뵴키 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??
@mahmoudalkateb2008
@mahmoudalkateb2008 2 жыл бұрын
activity.getSharedPrefrences()
@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 жыл бұрын
I showed this many times in my project Playlists like shopping list app, mvvm news app, running app
@mohitmahajan1947
@mohitmahajan1947 4 жыл бұрын
perfect explanation, thanks
@aswinpashok5224
@aswinpashok5224 2 жыл бұрын
Is reading/writing shared pref ok on main thread? Should we care about that?
@favuraki
@favuraki Жыл бұрын
i wanna a tut about using shared preferences for to-do list that you made
@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 жыл бұрын
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 жыл бұрын
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
@mohitmahajan1947
@mohitmahajan1947 4 жыл бұрын
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 жыл бұрын
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
@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 Жыл бұрын
Create the function and paste the code he wrote in "OnClickListener". Then call the function in the onCreate()
@likatest7718
@likatest7718 10 ай бұрын
How about saving my wallpaper image as bitmap in shared storage?
@mohamednashat4478
@mohamednashat4478 2 жыл бұрын
exactly your are amazing one
@NabeelHaider
@NabeelHaider 3 жыл бұрын
Why there is warning for this SharedPreferences.edit() without a corresponding commit() or apply() call ??? Please tell...
@yutaitadori7318
@yutaitadori7318 3 жыл бұрын
It's awesome already 🙂
@PhilippLackner
@PhilippLackner 3 жыл бұрын
thanks!
@ajaygalagali5963
@ajaygalagali5963 4 жыл бұрын
Thanks a lot.
@iamfunny2155
@iamfunny2155 3 жыл бұрын
Pls how to open permission for data collector of code in user's consent on Android studio
@KotlinBek
@KotlinBek 3 жыл бұрын
thanks man
@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 жыл бұрын
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 жыл бұрын
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..
NOTIFICATIONS - Android Fundamentals
15:39
Philipp Lackner
Рет қаралды 46 М.
PASSING DATA BETWEEN ACTIVITIES - Android Fundamentals
18:44
Philipp Lackner
Рет қаралды 47 М.
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 18 МЛН
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,2 МЛН
А что бы ты сделал? @LimbLossBoss
00:17
История одного вокалиста
Рет қаралды 8 МЛН
TOASTS AND CONTEXT - Android Fundamentals
16:51
Philipp Lackner
Рет қаралды 38 М.
RECYCLERVIEW - Android Fundamentals
24:58
Philipp Lackner
Рет қаралды 104 М.
FRAGMENTS - Android Fundamentals
17:29
Philipp Lackner
Рет қаралды 332 М.
The ONLY Correct Way to Load Initial Data In Your Android App?
12:27
Philipp Lackner
Рет қаралды 30 М.
How To Save and Load Data In Flutter Using SharedPreferences
23:39
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 18 МЛН