Home Page Icon
Home Page
Table of Contents for
Index
Close
Index
by Jason Wei
Android Database Programming
Android Database Programming
Table of Contents
Android Database Programming
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Storing Data on Android
Using SharedPreferences
Common use cases for SharedPreferences
Checking if it's the user's first time visit to your application
Checking when the application last updated itself
Remembering what the user's login username was
Remembering an application's state
Caching a user's location
Internal storage methods
External storage methods
SQLite databases
Summary
2. Using a SQLite Database
Creating advanced SQLite schemas
Wrappers for your SQLite database
Debugging your SQLite database
Summary
3. SQLite Queries
Methods for building SQLite queries
SELECT statements
WHERE filters and SQL operators
DISTINCT and LIMIT clauses
ORDER BY and GROUP BY clauses
HAVING filters and Aggregate functions
SQL vs. Java performance comparisons
Summary
4. Using Content Providers
ContentProvider
Implementing the query method
Implementing the delete and update methods
Implementing the insert and getType methods
Interacting with a ContentProvider
Practical use cases
Summary
5. Querying the Contacts Table
Structure of the Contacts content provider
Querying for Contacts
Modifying Contacts
Setting permissions
Summary
6. Binding to the UI
SimpleCursorAdapters and ListViews
Custom CursorAdapters
BaseAdapters and Custom BaseAdapters
Handling list interactions
Comparing CursorAdapters and BaseAdapters
Summary
7. Android Databases in Practice
Local database use cases
Databases as caches
Typical application design
Summary
8. Exploring External Databases
Different external databases
Google App Engine and JDO databases
GAE: an example with video games
The PersistenceManager and Queries
Summary
9. Collecting and Storing Data
Methods for collecting data
A primer on web scraping
Extending HTTP servlets for GET/POST methods
Scheduling CRON jobs
Summary
10. Bringing it Together
Implementing HTTP GET requests
Back to Android: parsing responses
Final steps: binding to the UI (again)
Summary
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Summary
Index
A
access speed /
External storage methods
Activity class
about /
SimpleCursorAdapters and ListViews
ListActivity /
SimpleCursorAdapters and ListViews
addURI() /
Implementing the query method
advanced SQLite schemas
creating /
Creating advanced SQLite schemas
AGGREGATION_MODE_DEFAULT /
Structure of the Contacts content provider
AGGREGATION_MODE_DISABLED /
Structure of the Contacts content provider
AGGREGATION_MODE_SUSPENDED /
Structure of the Contacts content provider
AND/OR operators /
WHERE filters and SQL operators
Android
internal storage methods /
Internal storage methods
Android applications backend
designing /
Local database use cases
Android Debug Bridge (adb) /
Debugging your SQLite database
Android manifest /
ContentProvider
Apache Tomcat server /
Different external databases
application design
steps /
Typical application design
ArrayAdapter /
Comparing CursorAdapters and BaseAdapters
AsyncTask class /
Back to Android: parsing responses
atomicity /
Modifying Contacts
AUTOINCREMENT property /
SQLite databases
AVG() aggregate function /
HAVING filters and Aggregate functions
AWS /
Different external databases
B
BaseAdapter
about /
BaseAdapters and Custom BaseAdapters
example /
Handling list interactions
comparing, with CursorAdapters /
Comparing CursorAdapters and BaseAdapters
BaseAdapter class /
BaseAdapters and Custom BaseAdapters
batchInsertGames() method /
Extending HTTP servlets for GET/POST methods
bindView() method /
Custom CursorAdapters
buildUnionQuery() method /
Methods for building SQLite queries
C
<cron> tags /
Scheduling CRON jobs
<cronentries> tag /
Scheduling CRON jobs
cache
about /
Databases as caches
working /
Databases as caches
CitizensTable class /
ContentProvider
CitizenTable class /
Implementing the insert and getType methods
clean() method /
A primer on web scraping
clear() method /
Using SharedPreferences
commit() method /
Using SharedPreferences
ContactBaseAdpater
implementing /
BaseAdapters and Custom BaseAdapters
ContactEntry class /
BaseAdapters and Custom BaseAdapters
Contacts
querying /
Querying for Contacts
modifying /
Modifying Contacts
Contacts ContentProvider
structure /
Structure of the Contacts content provider
ContactViewHolder class /
BaseAdapters and Custom BaseAdapters
ContentProvider
about /
ContentProvider
query method, implementing /
Implementing the query method
update() methods, implementing /
Implementing the delete and update methods
delete () method, implementing /
Implementing the delete and update methods
getType() method, implementing /
Implementing the insert and getType methods
insert() method, implementing /
Implementing the insert and getType methods
interacting /
Interacting with a ContentProvider
practical use cases /
Practical use cases
ContentProvider class /
ContentProvider
ContentResolver class /
Implementing the insert and getType methods
ContentValues class /
SQLite databases
,
Modifying Contacts
COUNT() aggregate function /
HAVING filters and Aggregate functions
COUNT() function /
ORDER BY and GROUP BY clauses
cron /
Scheduling CRON jobs
cron.xml file /
Scheduling CRON jobs
CRON jobs
scheduling /
Scheduling CRON jobs
CSV /
Local database use cases
CursorAdapter class /
Custom CursorAdapters
,
BaseAdapters and Custom BaseAdapters
CursorAdapters
comparing, with BaseAdapter /
Comparing CursorAdapters and BaseAdapters
custom BaseAdapter /
Comparing CursorAdapters and BaseAdapters
custom CursorAdapters /
Custom CursorAdapters
D
data
binding, to UI /
Final steps: binding to the UI (again)
data, retrieving
SimpleCursorAdapters /
SimpleCursorAdapters and ListViews
ListViews /
SimpleCursorAdapters and ListViews
data-centric applications /
Databases as caches
databases
as cache /
Databases as caches
data collection
ways /
Methods for collecting data
data parsing /
Back to Android: parsing responses
GET request, making from Android client side /
Back to Android: parsing responses
DBMS /
Different external databases
delete() method /
Wrappers for your SQLite database
,
Implementing the delete and update methods
DISTINCT clause /
DISTINCT and LIMIT clauses
div tag /
A primer on web scraping
doGet() method /
Extending HTTP servlets for GET/POST methods
E
EC2 /
Different external databases
entities /
Google App Engine and JDO databases
execSQL() method /
SQLite databases
external databases
types /
Different external databases
Apache Tomcat /
Different external databases
MySQL /
Different external databases
HTTP servlet /
Different external databases
about /
Different external databases
DBMS /
Different external databases
AWS /
Different external databases
EC2 /
Different external databases
RDS /
Different external databases
GAE /
Different external databases
JDO /
Different external databases
external storage methods
about /
External storage methods
F
<friends> tag /
Methods for collecting data
G
GAE /
Different external databases
video game example /
GAE: an example with video games
get() command /
Debugging your SQLite database
get() method /
SQLite databases
getBoolean() methods /
Using SharedPreferences
getExternalStorageState() method /
External storage methods
getInt() method /
SQLite databases
GetMethods class /
Back to Android: parsing responses
getObjectById() method /
The PersistenceManager and Queries
getResponseBody() method /
Back to Android: parsing responses
getSharedPreferences() method /
Using SharedPreferences
getString() method /
SQLite databases
getStudentsByGradeForCourse() method /
Wrappers for your SQLite database
getType() method /
Implementing the insert and getType methods
getVideoGamesByConsole() method /
Extending HTTP servlets for GET/POST methods
getView() method /
BaseAdapters and Custom BaseAdapters
getWritableDatabase() /
The PersistenceManager and Queries
Google App Engine
about /
Google App Engine and JDO databases
Google App Engine setup /
Google App Engine and JDO databases
GQL /
Google App Engine and JDO databases
grabGamesWithTag() method /
A primer on web scraping
GROUPBY clauses /
ORDER BY and GROUP BY clauses
groupBy group /
Wrappers for your SQLite database
GROUPBY statement /
SQL vs. Java performance comparisons
H
Handler class /
Back to Android: parsing responses
HAVING filter
about /
HAVING filters and Aggregate functions
having group /
Wrappers for your SQLite database
HAVING parameter /
HAVING filters and Aggregate functions
HtmlCleaner
URL /
A primer on web scraping
HtmlCleaner class /
A primer on web scraping
HttpGet class /
Back to Android: parsing responses
HTTP GET requests
implementing /
Implementing HTTP GET requests
HTTP requests
types, GET request /
Extending HTTP servlets for GET/POST methods
types, POST request /
Extending HTTP servlets for GET/POST methods
HttpResponse object /
Back to Android: parsing responses
HTTP servlet /
Different external databases
HttpServlet class /
Extending HTTP servlets for GET/POST methods
HTTP servlets
extending, for GET/POST methods /
Extending HTTP servlets for GET/POST methods
extending /
Extending HTTP servlets for GET/POST methods
I
img tag /
A primer on web scraping
InputStream /
Back to Android: parsing responses
insert() method /
SQLite databases
internal storage methods
accesssing /
Internal storage methods
J
JDBC /
Different external databases
JDO /
Different external databases
about /
Google App Engine and JDO databases
JSON /
Methods for collecting data
K
key-value pairs /
Using SharedPreferences
L
LayoutInflater class /
BaseAdapters and Custom BaseAdapters
LayoutInflater object /
Custom CursorAdapters
LIMIT clause /
DISTINCT and LIMIT clauses
about /
DISTINCT and LIMIT clauses
LIMIT n, m /
DISTINCT and LIMIT clauses
LIMIT n /
DISTINCT and LIMIT clauses
limit parameter /
Wrappers for your SQLite database
ListActivity class /
SimpleCursorAdapters and ListViews
ListAdapters
GET BaseAdapter /
Final steps: binding to the UI (again)
CursorAdapter /
Final steps: binding to the UI (again)
ListAdapters class /
SimpleCursorAdapters and ListViews
list interactions
handling /
Handling list interactions
ListView tag /
SimpleCursorAdapters and ListViews
localized database
use cases /
Local database use cases
SharedPreferences /
Local database use cases
external SD cards /
Local database use cases
SQLite databases /
Local database use cases
external databases /
Local database use cases
pros /
Local database use cases
lookup key /
Querying for Contacts
M
.mode MODE command /
Debugging your SQLite database
method
onCreate() /
Using SharedPreferences
,
SQLite databases
getSharedPreferences() /
Using SharedPreferences
get() /
Using SharedPreferences
,
SQLite databases
put() /
Using SharedPreferences
commit() /
Using SharedPreferences
remove() /
Using SharedPreferences
clear() /
Using SharedPreferences
getStringSet() /
Caching a user's location
openFileOutput() /
Internal storage methods
,
External storage methods
read() /
Internal storage methods
getExternalStorageState() /
External storage methods
onUpgrade() /
SQLite databases
,
Creating advanced SQLite schemas
insert() /
SQLite databases
execSQL() /
SQLite databases
getString() /
SQLite databases
getStudentsByGradeForCourse() /
Wrappers for your SQLite database
delete() /
Wrappers for your SQLite database
query() /
Wrappers for your SQLite database
MIME /
Implementing the insert and getType methods
ModelBase class /
GAE: an example with video games
MODE_MULTI_PROCESS mode /
Using SharedPreferences
MODE_WORD_WRITEABLE mode /
Using SharedPreferences
MODE_WORLD_READABLE mode /
Using SharedPreferences
MySQL /
Different external databases
N
newQuery() method /
The PersistenceManager and Queries
newView() method /
Custom CursorAdapters
O
.output FILENAME command /
Debugging your SQLite database
onCreate() /
Creating advanced SQLite schemas
onCreate() method /
Using SharedPreferences
,
SQLite databases
,
Creating advanced SQLite schemas
,
ContentProvider
,
Implementing the query method
onListItemClick() method /
Handling list interactions
onUpdate() method /
ContentProvider
onUpgrade() method /
SQLite databases
,
Creating advanced SQLite schemas
openFileOutput() method /
External storage methods
ORDER BY clauses /
ORDER BY and GROUP BY clauses
orderBy group /
Wrappers for your SQLite database
P
parseGameResponse() method /
Back to Android: parsing responses
permissions
setting /
Setting permissions
PersistenceManager /
The PersistenceManager and Queries
,
Summary
practical use cases /
Practical use cases
put() methods /
Using SharedPreferences
Q
queries /
The PersistenceManager and Queries
query() method /
Wrappers for your SQLite database
,
Methods for building SQLite queries
,
DISTINCT and LIMIT clauses
,
HAVING filters and Aggregate functions
,
ContentProvider
,
Implementing the query method
Quick Search widget /
Practical use cases
R
rawQuery() method /
Methods for building SQLite queries
RDS /
Different external databases
regular expressions (REGEX) /
A primer on web scraping
relational databases /
SQLite databases
remove() method /
Using SharedPreferences
Runnable class /
Back to Android: parsing responses
S
SAXParser classes /
Back to Android: parsing responses
SchemaHelper class /
Wrappers for your SQLite database
Secure Digital (SD) /
External storage methods
SELECT * FROM table_name command /
Debugging your SQLite database
SELECT * FROM table_name WHERE col = 'value' command /
Debugging your SQLite database
SELECT statements
about /
SELECT statements
results, validating /
SELECT statements
setTables() method /
HAVING filters and Aggregate functions
SharedPreferences
about /
Using SharedPreferences
using, example /
Using SharedPreferences
use cases /
Common use cases for SharedPreferences
SimpleCursorAdapter /
SimpleCursorAdapters and ListViews
,
Custom CursorAdapters
SQL /
SQLite databases
OR operator /
WHERE filters and SQL operators
DISTINCT clause /
DISTINCT and LIMIT clauses
LIMIT clause /
DISTINCT and LIMIT clauses
ORDER BY clauses /
ORDER BY and GROUP BY clauses
GROUPBY clauses /
ORDER BY and GROUP BY clauses
COUNT() function /
ORDER BY and GROUP BY clauses
SQLite /
SQLite databases
SQLite database
instantiating /
SQLite databases
wrappers /
Wrappers for your SQLite database
debugging /
Debugging your SQLite database
SQLiteDatabase class /
SQLite databases
,
Methods for building SQLite queries
SQLiteOpenHelper class /
SQLite databases
,
Creating advanced SQLite schemas
,
ContentProvider
,
The PersistenceManager and Queries
SQLite queries
building, methods /
Methods for building SQLite queries
SQLiteQueryBuilder clas /
SELECT statements
SQLiteQueryBuilder class /
Methods for building SQLite queries
,
HAVING filters and Aggregate functions
,
The PersistenceManager and Queries
about /
WHERE filters and SQL operators
SQL language performance
checking /
SQL vs. Java performance comparisons
startManagingCursor() method /
Interacting with a ContentProvider
storage space /
External storage methods
SUM() aggregate function /
HAVING filters and Aggregate functions
T
.tables command /
Debugging your SQLite database
U
UI
data, binding to /
Final steps: binding to the UI (again)
UNION SQL query /
SELECT statements
update() method /
Implementing the delete and update methods
URI /
ContentProvider
use cases, SharedPreferences
first time visit, checking /
Checking if it's the user's first time visit to your application
application update, checking /
Checking when the application last updated itself
login username, remembering /
Remembering what the user's login username was
applications state, remembering /
Remembering an application's state
users location, caching /
Caching a user's location
V
VideoGameBaseAdapter /
Final steps: binding to the UI (again)
W
web.xml file /
Extending HTTP servlets for GET/POST methods
web scraping /
Methods for collecting data
,
A primer on web scraping
about /
A primer on web scraping
WHERE filter /
Implementing the delete and update methods
WHERE filters
about /
WHERE filters and SQL operators
Wi-Fi only filter /
Databases as caches
wrappers
for SQLite database /
Wrappers for your SQLite database
X
XML /
Methods for collecting data
XPATH /
A primer on web scraping
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset