O'Reilly logo

Pro Android 4 by Satya Komatineni, Dave MacLean

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

Working with the Contacts API

So far, we have explored the basic idea behind the Contacts API by exploring its tables and views. We will now present a number of code snippets that can be used to explore contacts. These snippets are taken from the sample application that is developed to support this chapter. Although they are taken from the sample application, they are self sufficient to give a full picture. You can download the full sample program using the project download URL at the end of this chapter.

Exploring Accounts

We will start our exercise by writing a program that can print out the list of accounts. We have already given the code snippets necessary to get a list of accounts. Consider the class AccountsFunctionTester in Listing 30–13 ...

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