O'Reilly logo

Enterprise Android: Programming Android Database Applications for the Enterprise by Zane Pan, Laird Dornin, G. Blake Meike, Zigurd Mednieks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required