SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Downloaden Sie, um offline zu lesen
Android Development
Beyond the Basics
S.Vanjikumaran
Saving the Data
● Most Android apps need to save data!! even
if only to save information about the app
state during onPause() so the user's
progress is not lost.
● Most non-trivial apps also need to save user
settings, and some apps must manage large
amounts of information in files and
databases.
Saving Key-Value Sets
● If you have a relatively small collection of
key-values that you'd like to save, you
should use the SharedPreferences APIs.
Saving Files
● Android uses a file system that's similar to
disk-based file systems on other platforms.
This lesson describes how to work with the
Android file system to read and write files
with the File APIs.
Saving Data in SQL Database
● Saving data to a database is ideal for
repeating or structured data, such as contact
information. This class assumes that you are
familiar with SQL databases in general and
helps you get started with SQLite databases
on Android. The APIs you'll need to use a
database on Android are available in the
android.database.sqlite package.
What is SQLite?
● SQLite is an Open Source Database
● supports standard relational database
features
● It requires only little memory at runtime
● SQLite supports the data types
SQLite in Android
● SQLite is available on every Android device
● SQLite database in android does not require
any database setup
SQLite Architecture
SQL 101
● DML
● DDL
First Ever Database in Android
● What you need to know?
○ android.database.sqlite package
●
First Ever Database in Android
● Defines the table name and column names
for a single table
First Ever Database in Android
● Create a Database Using a SQL Helper
First Ever Database in Android
● Insert data into the database by passing a
ContentValues object to the insert() method
First Ever Database in Android
● Read Information from a Database
First Ever Database in Android
● When you need to modify a subset of your
database values, use the update() method.

Weitere ähnliche Inhalte

Ähnlich wie Android development beyond the basics

Android local databases
Android local databasesAndroid local databases
Android local databasesFatimaYousif11
 
Iphone programming: Core Data Tutorial for iOS
Iphone programming: Core Data Tutorial for iOSIphone programming: Core Data Tutorial for iOS
Iphone programming: Core Data Tutorial for iOSKenny Nguyen
 
12_Data_Storage_Part_2.pptx
12_Data_Storage_Part_2.pptx12_Data_Storage_Part_2.pptx
12_Data_Storage_Part_2.pptxFaezNasir
 
Android developer fundamentals training overview Part II
Android developer fundamentals training overview Part IIAndroid developer fundamentals training overview Part II
Android developer fundamentals training overview Part IIYoza Aprilio
 
Implementation of sql server based on sqlite engine on
Implementation of sql server based on sqlite engine onImplementation of sql server based on sqlite engine on
Implementation of sql server based on sqlite engine oneSAT Publishing House
 
SQLite in Flutter.pptx
SQLite in Flutter.pptxSQLite in Flutter.pptx
SQLite in Flutter.pptxNabin Dhakal
 
Dicoding Developer Coaching #26: Android | Menyimpan Database dengan Lebih Si...
Dicoding Developer Coaching #26: Android | Menyimpan Database dengan Lebih Si...Dicoding Developer Coaching #26: Android | Menyimpan Database dengan Lebih Si...
Dicoding Developer Coaching #26: Android | Menyimpan Database dengan Lebih Si...DicodingEvent
 
Android App Development 05 : Saving Data
Android App Development 05 : Saving DataAndroid App Development 05 : Saving Data
Android App Development 05 : Saving DataAnuchit Chalothorn
 
Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Vidyasagar Mundroy
 
Great IDEs for SQL Query Performance Tuning and Practice.pdf
Great IDEs for SQL Query Performance Tuning and Practice.pdfGreat IDEs for SQL Query Performance Tuning and Practice.pdf
Great IDEs for SQL Query Performance Tuning and Practice.pdfTosska Technology
 
Microsoft ignite 2018 SQL Server 2019 big data clusters - intro session
Microsoft ignite 2018  SQL Server 2019 big data clusters - intro sessionMicrosoft ignite 2018  SQL Server 2019 big data clusters - intro session
Microsoft ignite 2018 SQL Server 2019 big data clusters - intro sessionTravis Wright
 

Ähnlich wie Android development beyond the basics (20)

Android local databases
Android local databasesAndroid local databases
Android local databases
 
Iphone programming: Core Data Tutorial for iOS
Iphone programming: Core Data Tutorial for iOSIphone programming: Core Data Tutorial for iOS
Iphone programming: Core Data Tutorial for iOS
 
12_Data_Storage_Part_2.pptx
12_Data_Storage_Part_2.pptx12_Data_Storage_Part_2.pptx
12_Data_Storage_Part_2.pptx
 
Android developer fundamentals training overview Part II
Android developer fundamentals training overview Part IIAndroid developer fundamentals training overview Part II
Android developer fundamentals training overview Part II
 
Implementation of sql server based on sqlite engine on
Implementation of sql server based on sqlite engine onImplementation of sql server based on sqlite engine on
Implementation of sql server based on sqlite engine on
 
SQLite in Flutter.pptx
SQLite in Flutter.pptxSQLite in Flutter.pptx
SQLite in Flutter.pptx
 
SQLite database in android
SQLite database in androidSQLite database in android
SQLite database in android
 
Sqlite Multiple Table
Sqlite Multiple TableSqlite Multiple Table
Sqlite Multiple Table
 
Save data locally
Save data locallySave data locally
Save data locally
 
Database in Android
Database in AndroidDatabase in Android
Database in Android
 
Dicoding Developer Coaching #26: Android | Menyimpan Database dengan Lebih Si...
Dicoding Developer Coaching #26: Android | Menyimpan Database dengan Lebih Si...Dicoding Developer Coaching #26: Android | Menyimpan Database dengan Lebih Si...
Dicoding Developer Coaching #26: Android | Menyimpan Database dengan Lebih Si...
 
SSDT unleashed
SSDT unleashedSSDT unleashed
SSDT unleashed
 
Android App Development 05 : Saving Data
Android App Development 05 : Saving DataAndroid App Development 05 : Saving Data
Android App Development 05 : Saving Data
 
Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)
 
U nit 1_dbms
U nit 1_dbmsU nit 1_dbms
U nit 1_dbms
 
Great IDEs for SQL Query Performance Tuning and Practice.pdf
Great IDEs for SQL Query Performance Tuning and Practice.pdfGreat IDEs for SQL Query Performance Tuning and Practice.pdf
Great IDEs for SQL Query Performance Tuning and Practice.pdf
 
Storage 8
Storage   8Storage   8
Storage 8
 
PHP Oracle
PHP OraclePHP Oracle
PHP Oracle
 
Sqlite
SqliteSqlite
Sqlite
 
Microsoft ignite 2018 SQL Server 2019 big data clusters - intro session
Microsoft ignite 2018  SQL Server 2019 big data clusters - intro sessionMicrosoft ignite 2018  SQL Server 2019 big data clusters - intro session
Microsoft ignite 2018 SQL Server 2019 big data clusters - intro session
 

Mehr von Vanjikumaran Sivajothy

Mehr von Vanjikumaran Sivajothy (10)

Peaceful Distributed Microservice Architecture
Peaceful Distributed Microservice ArchitecturePeaceful Distributed Microservice Architecture
Peaceful Distributed Microservice Architecture
 
Demystifying API Management for Serverless Services
Demystifying  API Management  for Serverless ServicesDemystifying  API Management  for Serverless Services
Demystifying API Management for Serverless Services
 
Best Practice With PLSQL
Best Practice With PLSQLBest Practice With PLSQL
Best Practice With PLSQL
 
Sign Language recognition Presentation
Sign Language recognition Presentation Sign Language recognition Presentation
Sign Language recognition Presentation
 
Framework for hand gesture controlled video game
Framework for hand gesture controlled video gameFramework for hand gesture controlled video game
Framework for hand gesture controlled video game
 
Software architectures
Software architecturesSoftware architectures
Software architectures
 
Middleware Simplified
Middleware SimplifiedMiddleware Simplified
Middleware Simplified
 
OAuth2 simplified
OAuth2   simplifiedOAuth2   simplified
OAuth2 simplified
 
Hello androidforyarlmeetup
Hello androidforyarlmeetupHello androidforyarlmeetup
Hello androidforyarlmeetup
 
Foss con2011
Foss con2011Foss con2011
Foss con2011
 

Kürzlich hochgeladen

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 

Kürzlich hochgeladen (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 

Android development beyond the basics

  • 1. Android Development Beyond the Basics S.Vanjikumaran
  • 2. Saving the Data ● Most Android apps need to save data!! even if only to save information about the app state during onPause() so the user's progress is not lost. ● Most non-trivial apps also need to save user settings, and some apps must manage large amounts of information in files and databases.
  • 3. Saving Key-Value Sets ● If you have a relatively small collection of key-values that you'd like to save, you should use the SharedPreferences APIs.
  • 4. Saving Files ● Android uses a file system that's similar to disk-based file systems on other platforms. This lesson describes how to work with the Android file system to read and write files with the File APIs.
  • 5. Saving Data in SQL Database ● Saving data to a database is ideal for repeating or structured data, such as contact information. This class assumes that you are familiar with SQL databases in general and helps you get started with SQLite databases on Android. The APIs you'll need to use a database on Android are available in the android.database.sqlite package.
  • 6. What is SQLite? ● SQLite is an Open Source Database ● supports standard relational database features ● It requires only little memory at runtime ● SQLite supports the data types
  • 7. SQLite in Android ● SQLite is available on every Android device ● SQLite database in android does not require any database setup
  • 10. First Ever Database in Android ● What you need to know? ○ android.database.sqlite package ●
  • 11. First Ever Database in Android ● Defines the table name and column names for a single table
  • 12. First Ever Database in Android ● Create a Database Using a SQL Helper
  • 13. First Ever Database in Android ● Insert data into the database by passing a ContentValues object to the insert() method
  • 14. First Ever Database in Android ● Read Information from a Database
  • 15. First Ever Database in Android ● When you need to modify a subset of your database values, use the update() method.