Code example for Person

Methods: getDisplayName

0
 
    private String getHangoutParticipants() {
        Person currentPerson = mPlusClient.getCurrentPerson();
        StringBuilder sb = new StringBuilder();
        sb.append("The crazy information people can get when you accept permissions:").append("\n");
        sb.append("Name:" + currentPerson.getDisplayName()).append("\n");
        sb.append("Birthday:" + currentPerson.getBirthday()).append("\n");
        Location mCurrentLocation = mLocationClient.getLastLocation();
        sb.append("Current location:").append("\n").append("Lat:").append(mCurrentLocation.getLatitude()).append("\n").append("Log:").append(mCurrentLocation.getLongitude());
        return sb.toString();
    } 
 
    @Override 
    protected void onActivityResult(int requestCode, int responseCode, Intent intent) {
        super.onActivityResult(requestCode, responseCode, intent);
        if (requestCode == REQUEST_CODE_RESOLVE_ERR && responseCode == RESULT_OK) {
            mConnectionResult = null;
            mPlusClient.connect();
        } 
 
    }