Back to project page kakao-android-sdk-standalone.
The source code is released under:
Apache License
If you think the Android project kakao-android-sdk-standalone listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** * Copyright 2014 Minyoung Jeong <kkungkkung@gmail.com> * Copyright 2014 Kakao Corp./* ww w .ja va2 s. co m*/ * * Redistribution and modification in source or binary forms are not permitted without specific prior written permission. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.kakao; import android.graphics.Bitmap; import com.kakao.helper.Logger; import java.text.SimpleDateFormat; import java.util.Calendar; /** * ?????? ??? ????? ?? ???? * ????????? ??? ?? (nickName), ????????? ????? (birthday), ????????? ????? ?? (birthdayType), ????????? ??? ????? URL (profileImageURL), ????????? ??? ???????? ??????? URL (thumbnailURL), ????????? ?? ????? URL (bgImageURL)? ?????? ??. * @author MJ */ public class KakaoStoryProfile { private String nickName; private String profileImageURL; private String thumbnailURL; private String bgImageURL; private String birthday; private BirthdayType birthdayType; private Bitmap bgImageBitmap; private Calendar birthdayCalendar; public KakaoStoryProfile(String nickName, String profileImageURL, String thumbnailURL, String bgImageURL, String birthday, BirthdayType birthdayType) { this.nickName = nickName; this.profileImageURL = profileImageURL; this.thumbnailURL = thumbnailURL; this.bgImageURL = bgImageURL; this.birthday = birthday; this.birthdayType = birthdayType; } /** * ????????? ????? ?? */ public enum BirthdayType { /** * ?? ????? */ SOLAR("+"), /** * ???? ????? */ LUNAR("-"); private final String displaySymbol; BirthdayType(String s) { this.displaySymbol = s; } /** * ?? ???????? '+', ???? ???????? '-'? ????. * @return '+','-'? ????? ????? ????. */ public String getDisplaySymbol() { return displaySymbol; } } // for jackson public KakaoStoryProfile() { } /** * ?????? ?? * @return ?????? ?? */ public String getNickName() { return nickName; } /** * 480px * 480px ~ 1024px * 1024px ??????? ?????? ??? ????? URL * @return ?????? ??? ????? URL */ public String getProfileImageURL() { return profileImageURL; } /** * 160px * 160px ??????? ?????? ??????? ??? ????? URL * @return ?????? ??????? ??? ????? URL */ public String getThumbnailURL() { return thumbnailURL; } /** * 480px * 480px ~ 1024px * 1024px ??????? ?????? ?? ????? URL * @return ?????? ?? ????? URL */ public String getBgImageURL() { return bgImageURL; } /** * ?????? ????? MMdd ?? * @return ?????? ????? MMdd ?? */ public String getBirthday() { return birthday; } /** * ?????? ???????? Calendar ?? * @return ?????? ???????? Calendar ????? ?? */ public Calendar getBirthdayCalendar() { return birthdayCalendar; } /** * ?????? ????? ??. ?? ??? ???? * @return ?????? ????? ??. ?? ??? ???? */ public BirthdayType getBirthdayType() { return birthdayType; } /** * jackson??? ???? ?? ? ????. * @param birthday MMdd ????? ????? string ? */ public void setBirthday(final String birthday) { if(birthday == null) return; final SimpleDateFormat form = new SimpleDateFormat("MMdd"); birthdayCalendar = Calendar.getInstance(); try { birthdayCalendar.setTime(form.parse(birthday)); } catch (java.text.ParseException e) { Logger.getInstance().d(e); } this.birthday = birthday; } /** * ?? ??? string?? ???? ????. * @return ?? ??? ????? string */ @Override public String toString() { final StringBuilder sb = new StringBuilder("KakaoStoryProfile{"); sb.append("nickName='").append(nickName).append('\''); sb.append(", profileImageURL='").append(profileImageURL).append('\''); sb.append(", thumbnailURL='").append(thumbnailURL).append('\''); sb.append(", bgImageURL='").append(bgImageURL).append('\''); sb.append(", birthday='").append(birthday).append('\''); sb.append(", birthdayType=").append(birthdayType); sb.append('}'); return sb.toString(); } }