SlideShare a Scribd company logo
1 of 15
Download to read offline
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.

More Related Content

Similar to Android development beyond the basics

Android App Development 05 : Saving Data
Android App Development 05 : Saving DataAndroid App Development 05 : Saving Data
Android App Development 05 : Saving Data
Anuchit Chalothorn
 

Similar to 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
 

More from Vanjikumaran Sivajothy

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
Vanjikumaran Sivajothy
 

More from 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
 

Recently uploaded

Recently uploaded (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

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.