Simple Quiz App- Android Shared Preferences-store data using shared preferences tutorial

Veröffentlicht am: 14 Januar 2020
auf dem Kanal: Munir Hoque
2,349
26

In this tutorial we will learn how to store highest score of an user using Shared Preferences. Android Shared Preferences allows us to store data in the memory of android phone so that data is not lost even the app get closed.


Join our exclusive Facebook Group :   / 545337292987590  
code for this tutorial - https://bit.ly/2NoLj9c

This is the final part( part 11) video of our simple quiz app development.
Full Playlist :    • Simple Quiz App - App Introduction - ...  
10th part(Part 10 - Firebase Authentication - User login using Firebase Auth) -    • Simple Quiz App - Firebase Authentica...  
Ninth part(Part 9 - Options Menu with NavigationUI) -    • Simple Quiz App - Options Menu with N...  
Eighth part(Part 8 - Safe Args to pass data between fragments) -    • Simple Quiz App - Safe Args to pass d...  
Seventh part(Part 7 - Navigation and navigation pop behaviour) -    • Simple Quiz App - Navigation & Naviga...  
Sixth part(Part 6 - More Game Logic to generate questions and get score) -    • Simple Quiz App-Add more Game Logic  
Fifth part(Part 5 - DataBinding to update UI data) -    • Simple Quiz App- DataBinding  
Fourth part(Part 4 - Add Game Logic) -    • Simple Quiz App-Add some Game Logic  
Third part(Part 3 - Fragment and Navigation) -    • Simple Quiz App - Fragment and Naviga...  
Second part(Part 2 - Starter Project) - https://bit.ly/2svbmEv



 First, Let’s see what shared Prefences are.
1.Shared Preferences allows activities and applications to keep preferences or data.
2.If you have a relatively small collection of key-values that you'd like to save, you should use the SharedPreferences APIs. A SharedPreferences object points to a file containing key-value pairs and provides simple methods to read and write them.
3.Shared preferences only store Primitive data types like Integer, String, Double , Float or Boolean. If you want to store object type data please consider SQLite database.
4. Shared Preferences is persistent which means it stores data into disk of android phone. So that even if the app get closed the data still remains stored and ready to use.

This tutorial is focused on How to Save Variables in SharedPreferences.


Full Source Code - https://github.com/pastoral/Simple-Quiz

Join our exclusive Facebook Group :   / 545337292987590  


Tags: Android Shared Preferences,Android Shared Preferences Tutorial,Android Shared Preferences Example,Android Shared Preferences 2020,
android how to save data,android how to save variables,storing user details using sharedpreferences


Auf dieser Seite können Sie das Online-Video Simple Quiz App- Android Shared Preferences-store data using shared preferences tutorial mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Munir Hoque 14 Januar 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 2,349 Mal angesehen und es wurde von 26 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!