Chapter 8

Complex Device-Based Data: Android Contacts

WHAT’S IN THIS CHAPTER?

  • Using the Android Contacts database
  • Using the ContactsContract API
  • Learning how the Contacts database illustrates content provider concepts

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

Please note that all the code examples in this chapter are available at https://github.com/wileyenterpriseandroid/Examples.git and as a part of the book’s code download at www.wrox.com on the Download Code tab.

Most of this book is about innovative techniques that simplify your use of databases in Android and in network services backing Android applications. However, this chapter looks at a complex multi-table database with a complex content provider API that has a conventional design in the context of the database APIs in the Android system. That is, this chapter shows an example of how to create a big, complex SQL database and provider interface as a contrast to using the kinds of techniques covered in the rest of this book.

NOTE To get the most out of this chapter, you should have read Chapter 2, on relational database concepts and SQL, and Chapter 4, on the ContentProvider class and related classes.

PIM DATABASES: FOSSILS FROM SMARTPHONE PRE-HISTORY

The Contacts database was influenced by earlier smartphone architectures. The first smartphones were devices that combined mobile phones with personal information managers (PIMs). These pre-iPhone smartphones dated back to an era when there was no wide-area data connectivity, ...

Get Enterprise Android: Programming Android Database Applications for the Enterprise now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.