Android Sharedpreferences tutorial | how to use shared preferences android studio |sharedpreferences

  Рет қаралды 69,022

Coding with Dev

Coding with Dev

4 жыл бұрын

In this tutorial we will learn, How to use Shared Preferences in our android application to store data in the form of key-value pair..
-what is sharedpreferences in android?
Ans : Android provides many ways of storing data of an application. One of this way is called Shared Preferences. Shared Preferences allow you to save and retrieve data in the form of key,value pair.
#AndroidStudioTutorial #Sharedpreferences #Android #AndroidStudio #Codingwithdev
Follow Facebook Page Link - / coding-with-dev-101018...
Follow Instagram Link - / codingwithdev
For Bussiness Inquiries
-codingwithdev@gmail.com
-devendrac706@gmail.com
Subscribe My Channel #codingwitdev for more latest videos..
/ codingwithdev
Thank You :-)

Пікірлер: 44
@salaradosnica542
@salaradosnica542 3 жыл бұрын
I tried 4-5 methods of Shared Preferences and lost two days until I find across something like this simple and Great!!!. Congratulations
@alfonsomoreno6888
@alfonsomoreno6888 9 ай бұрын
Muchas gracias bro, me sirvio bastante
@lucianrekkless418
@lucianrekkless418 3 жыл бұрын
Thanks a lot man! As always very clear and constructed tutorial. Can you also create a video about using a new jetpack dataStore in Java for login session (storing user acount details)?
@dunraksmey6083
@dunraksmey6083 3 жыл бұрын
I Love of your work is done without getting me any doubts.
@CodingwithDev
@CodingwithDev 3 жыл бұрын
@Dun Raksmey , Thank You so much for your valuable response :-)
@jyotichavan9051
@jyotichavan9051 4 жыл бұрын
It's helpful tutorial
@Siddharth-rs1ge
@Siddharth-rs1ge 2 жыл бұрын
Work is done without any doubts bro. 🙏
@CodingwithDev
@CodingwithDev 2 жыл бұрын
Thanks for your valuable response
@arvind_chavan
@arvind_chavan 4 жыл бұрын
These was Great!!! Keep Doing Broo
@CodingwithDev
@CodingwithDev 4 жыл бұрын
Thank you so much for ur valuable response
@spyro2008
@spyro2008 Жыл бұрын
Thanks a lot!!!
@rohitbhardwaj8775
@rohitbhardwaj8775 Жыл бұрын
Everything is running good. When I launch the app and input name and id. I click on save button. There is no display of my name and email id on Welcome page?
@zolajigar5659
@zolajigar5659 2 жыл бұрын
❤️
@idroid_pe
@idroid_pe 4 жыл бұрын
Excellent but can you make a video about how to pass data from ActivityA to FragmentA?. The fragmentA is in ActivityB. Thanks in advanced.
@CodingwithDev
@CodingwithDev 4 жыл бұрын
@IDroid , Thank you so much for ur valuable response , i will try to make this tutorial in future...
@woonie3134
@woonie3134 3 жыл бұрын
Sir how can I change the text field after I saved? Let us say I made typo on my name and want to change .. how I edit
@DailyEmirs
@DailyEmirs 2 жыл бұрын
Great Video! I have the issue here when i force stop the app, it does not save the last activity and returned to login. It shown error Reading a NULL string not supported here.
@dillirajgautam4348
@dillirajgautam4348 2 жыл бұрын
helpful
@code_luke
@code_luke 3 ай бұрын
Hi friend! I'm beginner. Is a good practice do it? You create 3 static final variables in all Activities(MainActivity & HomeActivity).
@elderibanez4649
@elderibanez4649 8 ай бұрын
sos un capo
@rajatsonu01
@rajatsonu01 2 жыл бұрын
Thanks a lot bro.
@CodingwithDev
@CodingwithDev 2 жыл бұрын
@rajat , thank u for the valuable response 😊
@ErWayneCrafter
@ErWayneCrafter 2 жыл бұрын
Does the texts in the second page does not disappear even though I close the app and reopen it?
@differentgaming8378
@differentgaming8378 2 жыл бұрын
Iam stucked in a problem, I have designed 10 level quiz, it should be like 1st level unlock and reamaining should be locked. And when 1st level completed, the second level should be unlocked. And if I complete 5 levels and exit the apo, and when I open again, I should be in 6th level, please help me.
@viraj_hole
@viraj_hole 2 жыл бұрын
thank you so much sir ❤
@CodingwithDev
@CodingwithDev 2 жыл бұрын
Thnks for ur valuable response
@susanoo0217
@susanoo0217 Жыл бұрын
but how to change boolean value from another activity? help please
@luis28052
@luis28052 3 жыл бұрын
The information of the first activity is not deleted, how strange
@ManojKumar-tz3sd
@ManojKumar-tz3sd 3 жыл бұрын
I am not able to get the string value in home layout..can any one help me
@mawiramike2346
@mawiramike2346 2 жыл бұрын
share code please
@redwansharafatkabir9644
@redwansharafatkabir9644 3 жыл бұрын
Can I pass the data in the same way to another application ?
@mawiramike2346
@mawiramike2346 2 жыл бұрын
yes u can. the same exact way
@codethrusharing8955
@codethrusharing8955 2 жыл бұрын
you stop making videos?
@coffeemachines
@coffeemachines 3 жыл бұрын
very nice tutorial sir worked like charm. but i have problem when i click logout, its sometime take us to login page and sometime exit the application. how to fix this??
@CodingwithDev
@CodingwithDev 3 жыл бұрын
Please cross check ur shared preference name...I think something wrong ...
@mawiramike2346
@mawiramike2346 2 жыл бұрын
share code
@locklyn6206
@locklyn6206 2 жыл бұрын
can i have the code sir?
@marciopaulo1708
@marciopaulo1708 3 жыл бұрын
how do i save an image?
@CodingwithDev
@CodingwithDev 3 жыл бұрын
Its not recommended to store image in Share preferences And you should store that image to sdcard.And then store image path (from sdcard) into Share preferences like this.. SharedPreferences shre = PreferenceManager.getDefaultSharedPreferences(this); Editor edit=shre.edit(); edit.putString("imagepath","/sdcard/imh.jpeg"); edit.commit();
@marciopaulo1708
@marciopaulo1708 3 жыл бұрын
@@CodingwithDev OK. I will try here. Thanks!
@mawiramike2346
@mawiramike2346 2 жыл бұрын
best was is to store image link instead of image itself
@HENDROGNWN
@HENDROGNWN 5 ай бұрын
Source Code please
@williamguyon5991
@williamguyon5991 4 ай бұрын
im gay but it doesnt work
SAVING DATA IN SHARED PREFERENCES - Android Fundamentals
11:17
Philipp Lackner
Рет қаралды 36 М.
How to use Shared Preferences in kotlin
20:29
Android Geek
Рет қаралды 9 М.
small vs big hoop #tiktok
00:12
Анастасия Тарасова
Рет қаралды 19 МЛН
Final muy inesperado 🥹
00:48
Juan De Dios Pantoja
Рет қаралды 18 МЛН
FOOLED THE GUARD🤢
00:54
INO
Рет қаралды 62 МЛН
Preferences DataStore in 10min (SharedPreferences deprecated)
11:14
Philipp Lackner
Рет қаралды 72 М.
ViewModels & Configuration Changes - Android Basics 2023
18:46
Philipp Lackner
Рет қаралды 102 М.
How to Send Notification in Android
14:15
Codes Easy
Рет қаралды 36 М.
RecyclerView | Everything You Need to Know
25:07
Practical Coding
Рет қаралды 128 М.