Computer Science E-76 Building Mobile Applications
Computer Science E-76 Building Mobile Applications
Preferences
Files
Databases
SQLite
Data Storage
Methods
2
http://developer.android.com/reference/android/app/Activity.html
Activity
Lifecycle
3
Read
Context.openFileInput()
returns FileInputStream
Write
Context.openFileOutput()
returns FileOutputStream
Data Storage
Files
4
adb shell
sqlite3 /data/data/<pkg>/databases/<db>
Data Storage
SQLite
5
SQLite
Relational Database
6
TABLES
CREATE
ALTER
DROP
ROWS
SELECT
INSERT
UPDATE
DELETE
SQL
Statements
7
UPDATE users
SET email = "[email protected]"
WHERE user_id = 4;
SQL
Statement Syntax
8
http://www.sqlite.org/docs.html
SQLite
Documentation
9
NULL
INTEGER
signed integer
REAL
TEXT
Text string
BLOB
SQLite
Storage Classes
10
TEXT
NUMERIC
INTEGER
same as above*
REAL
NONE
SQLite
Type Affinities
11
SQLite
Column Affinities
12
By default, an app is
single-threaded
& single-process
Threads
13
14