use of sqlite.feature.many2many.case6.model.Person in project BachelorPraktikum by lucasbuschlinger.
the class GooglePeople method getAllProfiles.
/**
* Fetches the list of all profiles from the currently logged in user and passes them into the address book controller.
*/
public void getAllProfiles() {
try {
List<Person> persons = peopleService.people().connections().list("people/me").setPersonFields("names,addresses").setPageSize(PAGE_SIZE).execute().getConnections();
for (Person p : persons) {
if (p.getAddresses() != null) {
Contact c = new Contact(p.getNames().get(0).getDisplayName(), p.getAddresses());
AddressBook.getInstance().addContact(c);
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
Aggregations