MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology


Data Storage in java
Previous Home Next

You can store data in Android .Android provides several options to save persistent application data that is depended your need. if you do not want to share the data other application that means data should be private to your application.

There are several option for the data store :

  1. 1. Preferences : Preferences is a lightweight mechanism to store and retrieve primitive data types eg. booleans, floats, ints, longs, and strings etc. in key-value pairs. SharedPreferences class is used for this purpose. if you need multiple preferences files identified by name, which you specify with the first parameter then getSharedPreferences() is used and getPreferences() is used this if you need only one preferences file for your Activity.You don't supply a name.
  2. SharedPreferences setting = getSharedPreferences(My_Name, 0);


    SharedPreferences.Editor editor = settings.edit();



  3. Internal Storage : Internal storage data store is used when you want to store data in files on your mobile phone.By default, files saved to the internal storage are private to your application.
  4. External Storage : External storage data store is used when you want to store public in a removable storage or external storage medium.
  5. SQLite Databases : Android Api supports SQLite databases. All databases, SQLite and others, are Store structured data in a private database. The to create a new SQLite database that class extends SQLiteOpenHelper class and override the onCreate() method. when you want to use SQLite data storage, first create table in data base.
  6. Network Connection : Network connection is used to store data on own network server .You can also use the Internet to store and receive data, whether it's an SQLite database, or just a simple textfile.
Previous Home Next