PacktLib: Android Database Programming

Android Database Programming

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Storing Data on Android

Using SharedPreferences

Internal storage methods

External storage methods

SQLite databases

Summary

Using a SQLite Database

Creating advanced SQLite schemas

Wrappers for your SQLite database

Debugging your SQLite database

Summary

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

Using Content Providers

ContentProvider

Practical use cases

Summary

Querying the Contacts Table

Structure of the Contacts content provider

Querying for Contacts

Modifying Contacts

Setting permissions

Summary

Binding to the UI

SimpleCursorAdapters and ListViews

Custom CursorAdapters

BaseAdapters and Custom BaseAdapters

Handling list interactions

Comparing CursorAdapters and BaseAdapters

Summary

Android Databases in Practice

Local database use cases

Databases as caches

Typical application design

Summary

Exploring External Databases

Different external databases

Google App Engine and JDO databases

GAE: an example with video games

The PersistenceManager and Queries

Summary

Collecting and Storing Data

Methods for collecting data

A primer on web scraping

Extending HTTP servlets for GET/POST methods

Scheduling CRON jobs

Summary

Bringing it Together

Implementing HTTP GET requests

Back to Android: parsing responses

Final steps: binding to the UI (again)

Summary

Index