private void UpdateLayouts(MeV2Response result) { if (result != null) { } profileLayout.SetUserInfo(result); if (result.Properties != null) { extraUserPropertyLayout.ShowProperties(result.Properties); } }
private void InitializeProfileView() { profileLayout = FindViewById <ProfileLayout>(Resource.Id.com_kakao_user_profile); profileLayout.SetMeV2ResponseCallback(new MyMeV2ResponseCallback(this, (result) => { response = result; KakaoToast.MakeToast(ApplicationContext, "succeeded to get user profile", ToastLength.Short).Show(); UpdateLayouts(result); })); extraUserPropertyLayout = FindViewById <ExtraUserPropertyLayout>(Resource.Id.extra_user_property); }
public void SetUserInfo(MeV2Response response) { UserAccount account = response.KakaoAccount; SetUserId(response.Id.ToString()); if (account != null) { if (account.EmailNeedsAgreement() == OptionalBoolean.True) { SetEmail(Context.GetString(Resource.String.needs_account_email_scope)); } else { SetEmail(account.Email); } if (account.PhoneNumberNeedsAgreement() == OptionalBoolean.True) { SetPhoneNumber(Context.GetString(Resource.String.needs_phone_number_scope)); } else { SetPhoneNumber(account.PhoneNumber); } if (account.BirthdayNeedsAgreement() == OptionalBoolean.True) { SetBirthDay(account.Birthday); } if (account.Profile.ProfileImageUrl != null) { SetProfileURL(account.Profile.ProfileImageUrl); } if (account.AgeRange != null) { SetAgeRange(account.AgeRange); } if (account.Gender != null) { SetGender(account.Gender); } if (account.Profile.Nickname != null) { SetNickname(account.Profile.Nickname); } } UpdateLayout(); }
public override void OnSuccess(MeV2Response result) { action.Invoke(result); }