Similarly you can list the phone, emails, etc:
for (int ii = 0; ii< entry.getPhoneNumbers().size(); ii++) {
PhoneNumber phoneNumber = entry.getPhoneNumbers().get(ii);
String[] relSplit = phoneNumber.getRel().split("#");
System.out.println("Phone " + ii + ": \t" +
phoneNumber.getPhoneNumber() + "\t" + relSplit[1]);
}
will give you
Phone 0: 555-5555 work
Phone 1: 555-1111 mobile
Now that you know the location of the phone in the list
// Delete Phone
int locDel = 0;
System.out.print("\nPlease enter number of the phone to delete
");
locDel = Integer.parseInt(dataIn.readLine());
entry.getPhoneNumbers().remove(locDel);
entry.update();
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Contacts API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-contacts-api?hl=en
-~----------~----~----~----~------~----~------~--~---