SlideShare a Scribd company logo
Data
persistence in
Android
CS-6TH
E
AYESHA JAVED (30)
Hira Saeed(46)
Hamna Nasir(55)
Tehseen Iqbal(06)
Is Android
supports only
SQLITE?
????
???
NONO
What is Data persistence?
• Persistence is "the continuance of an effect after its 
cause is removed". In the context of storing data in a 
computer system, this means that the data survives after 
the process with which it was created has ended. In 
other words, for a data store to be 
considered persistent, it must write to non-volatile 
storage
WHY Persisting data ?
• Persisting data is an important topic in application 
development, as users typically expect to reuse data in the 
future. For Android, there are primarily Four basic ways of 
persisting data:
• A lightweight mechanism known as shared preferences to save 
small chunks of data
• Traditional file systems (Internal)
• External systems (Flash,drive)..
• A relational database management system through the 
support of SQLite databases
Android Storage Options:-
Shared
Preferences
s
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
Shared preferences
internal structure
• Shared preferences internally has an in-memory storage on 
top of disk storage. Every operation goes through in-memory 
storage first and then to the disk.
• In-memory storage is basically a HashMap which allows O(1) 
runtime complexity for all operations.
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
V
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
CHECK THE
CODE OF
SHARED
PREFERENCES
CHECK THE
CODE OF
SHARED
PREFERENCES
Content
Provider
Ayesha javed(30)
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
Cursor cursor =
getContentResolver().query(Uri.parse(queryUri), projection,
selectionClause, selectionArgs, sortOrder);
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
• <provider android:name=".WordListContentProvider"
android:authorities="com.android.example.wordlistsqlwithco
ntentprovider.provider" android:exported="true"/>
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
``
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
• shared preferences are the location where you can store the
secret information for your app, like setting cookies in the
browser, this can be used for login credentials and other.
• where as content provider stores and retrieves the data and
make it available to other applications also. like suppose you
want to access the contacts available in the android phone,
they can be accessed by content providers
CHECK THE
CODE OF
CONTENT
PROVIDER
CHECK THE
CODE OF
CONTENT
PROVIDER
Internal
Storage
Hira saeed(46)
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
External
Storage
Hamna Nasir(55)
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
SQLITE
Tehseen Iqbal(06)
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM

More Related Content

DOC
SRS on online auction system
PPT
Introduction To Robotics
PDF
Classes and Objects
PPTX
Notion of an algorithm
PPT
Transmission Modes in Computer Networks
PDF
Data Communication and Networking
PPTX
Graph coloring using backtracking
PPTX
Android testing
SRS on online auction system
Introduction To Robotics
Classes and Objects
Notion of an algorithm
Transmission Modes in Computer Networks
Data Communication and Networking
Graph coloring using backtracking
Android testing

What's hot (20)

PDF
Android Data Persistence
PPTX
Operating system security
PPT
Data Storage In Android
PPTX
Process synchronization
PPTX
Distributed file system
PPTX
Virtual memory presentation
PDF
Object oriented databases
PPTX
File Management in Operating System
PPTX
Cloud Computing & Big Data
ODP
Distributed operating system(os)
PPTX
Storage As A Service (StAAS)
PDF
Object Modelling Technique " ooad "
PPTX
Android User Interface
PPTX
Synchronization hardware
PPTX
Database security
PPTX
Integrative Programming Technology Chapter 5 - Dr. J. VijiPriya
PPT
Android application structure
PPTX
Distributed Computing system
PPTX
oops concept in java | object oriented programming in java
PDF
operating system structure
Android Data Persistence
Operating system security
Data Storage In Android
Process synchronization
Distributed file system
Virtual memory presentation
Object oriented databases
File Management in Operating System
Cloud Computing & Big Data
Distributed operating system(os)
Storage As A Service (StAAS)
Object Modelling Technique " ooad "
Android User Interface
Synchronization hardware
Database security
Integrative Programming Technology Chapter 5 - Dr. J. VijiPriya
Android application structure
Distributed Computing system
oops concept in java | object oriented programming in java
operating system structure
Ad

Similar to DATA PERSISTENCE IN ANDROID OPERATING SYSTEM (20)

PPT
Computer Software and it's various types
PPTX
Presentaion About Processor and Memory.pptx
PPTX
Database design process
PPT
Data Privacy at Scale
PDF
Data Integration Alternatives: When to use Data Virtualization, ETL, and ESB
PPTX
Gr 2 How Information System is Implemented into an Organization
DOCX
ISSC340_Presentation_Ronald_Averion.pptxNAME Ronald Averi.docx
PPT
ITE v5.0 - Chapter 5
PDF
Lecture 6
PPTX
Big Data Hadoop, Data Analytics, Environment
PPTX
Windows_Installation.pptx
PDF
High Performance data mining platforms-Things to consider
PPTX
Chapter 1,2,3 & 4_Win Server AD Basics.pptx
PDF
3 dw architectures
PDF
Lecture 1
PDF
Lab4 - android
PDF
Module-5-RTOS-and-IDE-for-Embedded-System-Design (1).pdf
PPT
chapter 1_Overview of operating systems.ppt
PDF
OPERATING SYSTEM PRESENTION.pdf
PDF
Windows 8 dddd (beekelaar)
Computer Software and it's various types
Presentaion About Processor and Memory.pptx
Database design process
Data Privacy at Scale
Data Integration Alternatives: When to use Data Virtualization, ETL, and ESB
Gr 2 How Information System is Implemented into an Organization
ISSC340_Presentation_Ronald_Averion.pptxNAME Ronald Averi.docx
ITE v5.0 - Chapter 5
Lecture 6
Big Data Hadoop, Data Analytics, Environment
Windows_Installation.pptx
High Performance data mining platforms-Things to consider
Chapter 1,2,3 & 4_Win Server AD Basics.pptx
3 dw architectures
Lecture 1
Lab4 - android
Module-5-RTOS-and-IDE-for-Embedded-System-Design (1).pdf
chapter 1_Overview of operating systems.ppt
OPERATING SYSTEM PRESENTION.pdf
Windows 8 dddd (beekelaar)
Ad

More from AYESHA JAVED (20)

DOCX
Neural network basic
PPTX
JOHN DEWEY THE FATHER OF EDUCATIONAL PHILOSOPHY
PPTX
The recommendations system for source code components retrieval
DOCX
Jhon dewey __final document........#######____@@@ayesha javed
PPTX
Normalization
PPT
Lecture for 10 oct 2019 sentence types-workshop
DOCX
Exercise solution of chapter3 of datawarehouse cs614(solution of exercise)
DOCX
Exercise solution of chapter1 of datawarehouse cs614(solution of exercise)
DOCX
This is an empirical study of industry practice in the management of softwar...
DOCX
Critical analysis of an integrative contingency model of software project ris...
DOCX
A strand lead to success in project management
PPTX
PETROL SYSTEM
PPTX
INTERNET OF THING PRESENTATION ON PUBLIC SPEAKING
PPT
Eclipse introduction IDE PRESENTATION
PPTX
Cyber security Information security
PPTX
Moore and mealy machines
DOCX
Fundamental of VISUAL PROGRAMMING LAB
DOCX
Hec registration form VISUAL C# PROGRAMMING
DOCX
VISUAL PROGRAMING GRIDVIEW
DOCX
VISUAL PROGRAMING LOGIN_SIGNUP_FOAM
Neural network basic
JOHN DEWEY THE FATHER OF EDUCATIONAL PHILOSOPHY
The recommendations system for source code components retrieval
Jhon dewey __final document........#######____@@@ayesha javed
Normalization
Lecture for 10 oct 2019 sentence types-workshop
Exercise solution of chapter3 of datawarehouse cs614(solution of exercise)
Exercise solution of chapter1 of datawarehouse cs614(solution of exercise)
This is an empirical study of industry practice in the management of softwar...
Critical analysis of an integrative contingency model of software project ris...
A strand lead to success in project management
PETROL SYSTEM
INTERNET OF THING PRESENTATION ON PUBLIC SPEAKING
Eclipse introduction IDE PRESENTATION
Cyber security Information security
Moore and mealy machines
Fundamental of VISUAL PROGRAMMING LAB
Hec registration form VISUAL C# PROGRAMMING
VISUAL PROGRAMING GRIDVIEW
VISUAL PROGRAMING LOGIN_SIGNUP_FOAM

Recently uploaded (20)

PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Computing-Curriculum for Schools in Ghana
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Lesson notes of climatology university.
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Insiders guide to clinical Medicine.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
RMMM.pdf make it easy to upload and study
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Classroom Observation Tools for Teachers
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Microbial diseases, their pathogenesis and prophylaxis
O5-L3 Freight Transport Ops (International) V1.pdf
PPH.pptx obstetrics and gynecology in nursing
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Computing-Curriculum for Schools in Ghana
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
VCE English Exam - Section C Student Revision Booklet
102 student loan defaulters named and shamed – Is someone you know on the list?
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Lesson notes of climatology university.
Final Presentation General Medicine 03-08-2024.pptx
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Insiders guide to clinical Medicine.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
RMMM.pdf make it easy to upload and study
Supply Chain Operations Speaking Notes -ICLT Program
Classroom Observation Tools for Teachers

DATA PERSISTENCE IN ANDROID OPERATING SYSTEM

Editor's Notes

  • #8: Store private and primitive data in key value pairs  Primitive types are the most basic data types available within the Java language. There are 8: boolean , byte , char , short , int , long , float and double . These types serve as the building blocks of data manipulation in Java
  • #13: android.content.SharedPreferences.Editor Interface used for modifying values in a SharedPreferences object. All changes you make in an editor are batched, and not copied back to the original SharedPreferences until you call commit() or apply()
  • #18: HashMap is a Map based collection class that is used for storing Key &amp; value pairs, it is denoted as HashMap&amp;lt;Key, Value&amp;gt; or HashMap&amp;lt;K, V&amp;gt;.
  • #45: android:exported Whether the content provider is available for other applications to use:true: The provider is available to other applications. Any application can use the provider&amp;apos;s content URI to access it, subject to the permissions specified for the provider. false: The provider is not available to other applications. Set android:exported=&amp;quot;false&amp;quot;to limit access to the provider to your applications. Only applications that have the same user ID (UID) as the provider will have access to it.
  • #63: In revision control systems, a repository[1] is a data structure which stores metadata for a set of files or directory structure In computing, cross-platform software (also multi-platform software or platform-independent software) is computer software that is implemented on multiple computing platforms.[
  • #71: The main purpose CardView serves in the Material Design universe is to provide a unified look to all of the card based UIs making it easier for developers to create seamless interfaces. In this post, we will see what opportunities CardView provides on Android platform and how to use it properly in our application