Code example for Person

Methods: getCurrentLocation, getDisplayName, getImage, getOrganizations, getTagline, getUrl

0
	@Override 
	public void onPersonLoaded(ConnectionResult status, Person person) {
		if (status.getErrorCode() == ConnectionResult.SUCCESS) {
 
			user = new Participant();
			String fullName = person.getDisplayName();
			user.setFirstname(fullName.substring(0, fullName.indexOf(' ')));
			user.setLastname(fullName.substring(fullName.indexOf(' ')));
			user.setEmail(mPlusClient.getAccountName());
			user.setBiography(person.getTagline());
			user.setCity((person.getCurrentLocation() == null) ? "N/A" : person.getCurrentLocation());
			user.setCountry((person.getCurrentLocation() == null) ? "N/A" : person.getCurrentLocation());
			user.setCompany(person.getOrganizations().get(0).getName());
			user.setPhoto(getBestPictureSize(person.getImage().getUrl()));
			user.setWebsite(person.getUrl());
			user.setPassword(getFakePassword());
			user.setPhone("N/A");
 
			registerUser(); 
 
		} else {