98 ◾ PhoneGap Build
contact(s). e onSuccess callback method returns an array of Contact objects that meet the
specified filter and options. e name of the contacts, that is, displayName property, is
accessed from the array of Contact objects and displayed through the <div> element of the ID
contactsinfo.
To invoke the index.html file that we created in the assets/www directory, the code as
shown in Listing 5.2 is written in the Java activity file PGContactsReadAppActivity.java.
Listing 5.2 Code Written in the Java Activity File: PGContactsReadAppActivity.java
package com.phonegap.pgcontactsreadapp;
import android.os.Bundle;
import org.apache.cordova.DroidGap;
public class PGContactsReadAppActivity extends DroidGap {
@Override
public void onCreate(Bundle ...