버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.
목차
stylenone

...

Initialization and Status Change Event Processing

...

SDK

...

Initialization

발췌문 삽입
EN_Initialization and Status Change Event Processing SDK Example
EN_Initialization and Status Change Event Processing SDK Example
nameapplication_init_sdk
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTApplication;
import com.kakaogame.KGTConfig;

/**
 * When 단일using 앱으로a 사용하는single 경우app
 */
KGTConfig config = new KGTConfig();
config.setAppInfo(
	"909428", // appID
	"c3c38bbfa3828b342d946e9770c974d0", // appSecret
	"1.0.0", // appVersion
	"googlePlay", // market
	"14", // ageRating
	KGTServerType.QA, // server type
	KGTLogLevel.Error // log level
);

/**
 * When using 그룹을an 사용하는app 경우group
 */
Map<String, String> appsForAppGroup = new HashMap<>();
appsForAppGroup.put("909428", "c3c38bbfa3828b342d946e9770c974d0");
appsForAppGroup.put("921478", "5891c32124ca35821890a0bc1cec77a5");

KGTConfig config = new KGTConfig();
config.setAppGroupInfos(
	"tubeAppGroup", // appGroupId
	appsForAppGroup, // app info map
	"1.0.0", // appVersion
	"googlePlay", // market
	"14", // ageRating
	KGTServerType.QA, // server type
	KGTLogLevel.Error // log level
);


KGTApplication.initSDK(this, config);

...

Start

...

발췌문 삽입
EN_Initialization and Status Change Event Processing SDK Example
EN_Initialization and Status Change Event Processing SDK Example
nameapplication_start
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTApplication;
import com.kakaogame.KGTIdpProfile;
import com.kakaogame.KGTPlayer;
import com.kakaogame.KGTResult;

KGTApplication.start(activity, null, result -> {
	if (result.isSuccess()) {
		// 스타트가If the 성공start is 경우successful

		// 자동로그인 여부 Check if auto-login is enabled
		boolean isLoggedIn = KGTPlayer.isLoggedIn();

		if (isLoggedIn) {
			// 플랫폼에서 발급한 현재 Player의 IDThe ID of the current Player issued by the platform
			String playerId = KGTPlayer.getCurrentPlayer().getPlayerId();

			// 플랫폼Platform access 액세스token 토큰(ZAT)
			String accessToken = KGTPlayer.getCurrentPlayer().getAccessToken();

			// Retrieve the 현재current IDP 인증authentication 정보를information
가져옴
			KGTIdpProfile idpProfile = KGTPlayer.getCurrentPlayer().getIdpProfile();

			// [TODO] Move 게임to 화면으로the 이동game 합니다screen.
		} else {
			// [TODO] 자동로그인이 안 된 경우 로그인 화면으로 이동 합니다 If auto-login is not enabled, move to the login screen.
		}
	} else {
		// 스타트가If 실패the start 경우fails - 초기화가since 실패한initialization 경우failed, 이므로you 스타트를should 재시도retry 하거나the 앱을start 종료or 하여야exit the 합니다app.
		int resultCode = result.getCode();

		if (resultCode == KGTResult.KGTResultCode.NETWORK_FAILURE 
			|| resultCode == KGTResult.KGTResultCode.SERVER_TIMEOUT
			|| resultCode == KGTResult.KGTResultCode.SERVER_CONNECTION_FAILED) {
			// [TODO] 네트워크 에러가 발생한 경우에는 유저에게 네트워크 이슈로 스타트에 실패했음을 알리고 재시도 If a network error occurs, inform the user that the start failed due to a network issue and retry.
		} else {
			// [TODO] If another 나머지error 에러가occurs, 발생한provide 경우에는an 에러error 안내message and 스타트prompt 재시도to 요청retry 하여야the 합니다start. - 문제가If 반복해서 발생하는 경우 에러코드 및 로그 확인 후 원인 파악이 필요합니다the problem persists, check the error code and logs to determine the cause.
		}
	}
});

Pause

...

발췌문 삽입
EN_Initialization and Status Change Event Processing SDK Example
EN_Initialization and Status Change Event Processing SDK Example
nameapplication_pause
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTApplication;
import com.kakaogame.KGTResult;
 
KGTApplication.pause(activity, result -> {
	//
});

Resume

...

발췌문 삽입
EN_Initialization and Status Change Event Processing SDK Example
EN_Initialization and Status Change Event Processing SDK Example
nameapplication_resume
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTApplication;
import com.kakaogame.KGTResult;
 
KGTApplication.resume(activity, result -> {
	if (result.isSuccess()) {
		// [TODO] resume이If resume 성공is successful, 경우resume 게임the 화면을game 재개합니다screen.
	} else {
		// [TODO] resume이If 실패resume fails, 경우move 인증to 실패the login 로그인screen 화면으로, 그외의 경우는 에러 팝업을 띄우고 재시도 여부를 확인합니다if it's an authentication failure, and otherwise show an error popup and check whether to retry.
		if (result.getCode() == KGTResult.KGTResultCode.AUTH_FAILURE 
			|| result.getCode() == KGTResult.KGTResultCode.IDP_AUTH_FAILURE) {
			// [TODO] 인증 실패의 경우 시작 화면으로 이동해서 다시 신규 로그인 flow를 수행합니다 In case of authentication failure, move to the start screen and perform the new login flow again.
		} else {
			// [TODO] 나머지For 에러가other 발생한errors, 경우show 경우an 에러error 안내message and resumeretry the 재시도resume 합니다process. -If 반복해서the 문제가issue 발생하는persists, 경우close 앱을the 종료하도록 합니다app.
		}
	}
});

...

Adding a New Intent Receive Setting

발췌문 삽입
EN_Initialization and Status Change Event Processing SDK Example
EN_Initialization and Status Change Event Processing SDK Example
nameapplication_android_intent
nopaneltrue

코드 블럭
languagejava
@Override
protected void onNewIntent(Intent intent) {
    super.onNewIntent(intent);
     
    // 현재 액티비티에 새로운 Update the current activity with the new intent
업데이트     this.setIntent(intent);
}

...

Login

...

발췌문 삽입
EN_Login SDK Example
EN_Login SDK Example
namelogin
nopaneltrue

...

Logging In Without Using the Default Login UI

발췌문 삽입
EN_Login SDK Example
EN_Login SDK Example
namelogin_custom
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTApplication;
import com.kakaogame.KGTIdpProfile;
import com.kakaogame.KGTPlayer;
import com.kakaogame.KGTResult;

// 로그인Set the 하고자IdpCode 하는for IdpCodethe 셋팅login
KGTIdpProfile.KGTIdpCode code = KGTIdpCode.Kakao;

// 특정Log idp로in 로그인with 하기
KGTPlayera specific IDP
KGTPlayer.login(activity, code, result -> {
	if (result.isSuccess()) {
		// IDP login 로그인과and 플랫폼platform 로그인login 성공succeeded

		// 플랫폼에서 발급한 현재 Player의 ID The current Player ID issued by the platform
		String playerId = KGTPlayer.getCurrentPlayer().getPlayerId();

		// 플랫폼Platform 액세스access 토큰token
		String accessToken = KGTPlayer.getAccessToken();

		// 현재Retrieve the current IDP 인증authentication 정보를information
가져옴
		KGTIdpProfile idpProfile = KGTPlayer.getCurrentPlayer().getIdpProfile();

		// [TODO] 로그인 이 성공하였으므로 게임 화면으로 이동합니다 Since login was successful, proceed to the game screen.
	} else {
		// IDP 로그인login 혹은or 플랫폼platform 로그인login 실패failed
		// [TODO] 로그인In 실패case of login 사용자failure, 안내inform the user 시도and 하도록allow 하여야a 합니다retry.

		if (result.getCode() == KGTResult.KGTResultCode.NETWORK_FAILURE 
			|| result.getCode() == KGTResult.KGTResultCode.SERVER_TIMEOUT
			|| result.getCode() == KGTResult.KGTResultCode.SERVER_CONNECTION_FAILED) {
			// [TODO] 네트워크 에러가 발생한 경우에는 로그인 재시도 요청 하여야 합니다 If a network error occurs, prompt the user to retry the login.
		} else if (result.getCode() == KGTResult.KGTResultCode.USER_CANCELED) {
			// [TODO] If 사용자가the 로그인user 진행canceled the 취소한login 상황이므로process, 로그인keep 화면을the 유지login 하여야screen 합니다active.
		} else if (result.getCode() == KGTResult.KGTResultCode.BLOCKED_BY_POLICY) {
			// [TODO] 차단당한The 국가login 코드 또는 IP 대역에서 로그인을 시도하였습니다. 이에 대한 처리가 필요합니다was attempted from a blocked country code or IP range. Handle accordingly.
		} else {
			// [TODO] 나머지 에러가 발생한 경우에는 에러 안내 후 로그인 재시도 요청 하여야 합니다. - 에러코드 및 로그 확인 후 원인 파악이 필요합니다 For any other errors, display an error message and prompt the user to retry login. - Check the error code and logs to identify the cause.
		}
	}
});

...

Logout

...

발췌문 삽입
EN_Logout SDK Example
EN_Logout SDK Example
namelogout
nopaneltrue

...

Logging Out Without Using the Default Logout UI

발췌문 삽입
EN_Logout SDK Example
EN_Logout SDK Example
namelogout_custom
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTPlayer;
import com.kakaogame.KGTResult;

// 로그아웃Logout 요청request
KGTPlayer.logout(activity, false, result -> {
	if (result.isSuccess()) {
		// 로그아웃Logout 성공successful

		// [TODO] Return 시작to the 화면으로start 돌아가기screen
	} else {
		// 로그아웃Logout 실패failed
	}
});

...

Unregistration

...

발췌문 삽입
탈퇴 SDK 예제
탈퇴 SDK 예제
nameunregister
nopaneltrue

...

Unregistering Without Using the Default Unregistration UI

발췌문 삽입
탈퇴 SDK 예제
탈퇴 SDK 예제
nameunregister_custom
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTPlayer;
import com.kakaogame.KGTResult;

// 탈퇴Unregister 요청request
KGTPlayer.unregister(activity, false, result -> {
	if (result.isSuccess()) {
		// 탈퇴Unregistration 성공successful

		// [TODO] 시작 화면으로 돌아가기Return to the start screen
	} else {
		// 탈퇴Unregistration 실패failed 
	}
});

...

Account Linking

...

발췌문 삽입
EN_Account Linking SDK Example
EN_Account Linking SDK Example
nameconnect
nopaneltrue

...

Linking Accounts Without Using the Default Account Linking UI

발췌문 삽입
EN_Account Linking SDK Example
EN_Account Linking SDK Example
nameconnect_custom
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTPlayer;
import com.kakaogame.KGTIdpProfile;
import com.kakaogame.KGTResult;

// Set the 로그인IdpCode 하고자to 하는log IdpCodein 셋팅with
KGTIdpProfile.KGTIdpCode code = KGTIdpCode.Kakao;

// 특정Connect account idp로with 계정a 연결specific 하기idp
KGTPlayer.connect(activity, code, result -> {
	if (result.isSuccess()) {
		// IDP 연결connection 성공successful
		// Player ID will 변경되지not 않습니다change.
	} else {
		// IDP 연결connection 실패failed

		if (result.getCode() == KGTResult.KGTResultCode.INVALID_PARAMETER) {
			// 잘못된Invalid 인자가parameter 전달passed
된 경우
			// 예)e.g., activity is null
		} else if (result.getCode() == KGTResult.KGTResultCode.NOT_AUTHORIZED) {
			// 현재The 인증이current 안되어state 있는is not 경우authorized
		} else if (result.getCode() == KGTResult.KGTResultCode.INVALID_STATE) {
			// 현재The 인증currently authenticated IDP is 기기not 인증이device 아닌 경우authentication
		} else if (result.getCode() == KGTResult.KGTResultCode.ALREADY_USED_IDP_ACCOUNT) {
			// 이미The 인증되어account 있는is 계정인already 경우authenticated
		} else {
			// 기타Other 에러errors 발생occurred
		}
	}
});

프로필

...

Profile

...

Retrieve My Information

발췌문 삽입
EN_Profile SDK Example
EN_Profile SDK Example
nameplayer_currentPlayer
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTPlayer;

KGTPlayer localPlayer = KGTPlayer.getCurrentPlayer();

...

Retrieve My IDP

...

Information

발췌문 삽입
EN_Profile SDK Example
EN_Profile SDK Example
nameplayer_idpProfile
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTPlayer;
import com.kakaogame.KGTIdpProfile;

KGTIdpProfile idpProfile = KGTPlayer.getCurrentPlayer().getIdpProfile();

시스템 정보

...

System Information

...

Retrieve Language Code

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_language_code
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTSystem;

String languageCode = KGTSystem.getLanguageCode();

...

Retrieve Language Tag

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_language_tag
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTSystem;

String languageCode = KGTSystem.getLanguageTag();

...

Retrieve Country Code

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_country_code
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTSystem;

String countryCode = KGTSystem.getCountryCode();

...

Retrieve IP-based Country Code

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_geo_country_code
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTSystem;

String countryCode = KGTSystem.getGeoCountryCode();

...

Retrieve Device ID

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_device_id
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTSystem;

String deviceId = KGTSystem.getDeviceId();

...

Retrieve Device Model

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_device_model
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTSystem;

String deviceModel = KGTSystem.getDeviceModel();

Retrieve OS

...

Name

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_os_name
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTSystem;

String osName = KGTSystem.getOSName();

...

Retrieve Network Connection Status

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_is_network_connected
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTSystem;

boolean networkConnected = KGTSystem.isNetworkConnected();

...

Retrieve Connected Network Type

발췌문 삽입
EN_System Information SDK Example
EN_System Information SDK Example
namesystem_network_type
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTSystem;

String networkType = KGTSystem.getNetworkType();

카카오 연동 기능

...

Kakao Integration Feature

...

Setting Up KakaoTalk Game Message Reception

발췌문 삽입
EN_Kakao Integration Feature SDK Example
EN_Kakao Integration Feature SDK Example
namekakao_talk_show_setting
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTKakaoTalk;

// 카카오톡Display 게임the 메시지KakaoTalk 수신game 여부message 설정reception setting 띄우기view
KGTKakaoTalk.showSetting(activity, result -> {
	if (result.isSuccess()) {
		// 카카오톡Successfully 게임set 메시지KakaoTalk 수신game 여부message 설정reception
성공
		boolean allowMessage = result.getContent(); // 설정된Whether 메시지message 수신reception 허용is 여부allowed
	} else if (result.getCode() == KGTResult.KGTResultCode.NOT_KAKAOTALK_USER) {
		// 로그인 한 유저가 '카카오톡' 유저가 아닙니다. 카카오 스토리만 가입한 유저의 계정과 같이 카카오톡 유저가 아닌 경우 The logged-in user is not a KakaoTalk user. This occurs if the account is only registered with KakaoStory and not with KakaoTalk.
	} else {
		// 카카오톡Failed 게임to 메시지set 수신KakaoTalk 여부game 설정message 실패reception
	}
});

...

KakaoTalk Profile Retrieval

발췌문 삽입
EN_Kakao Integration Feature SDK Example
EN_Kakao Integration Feature SDK Example
namekakao_talk_talk_profile
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTKakaoTalk;
import com.kakaogame.KGTKakaoTalkProfile;

// 카카오톡Retrieve 프로필KakaoTalk 조회하기profile
KGTKakaoTalk.talkProfile(result -> {
	if (result.isSuccess()) {
		// 카카오톡Successfully 프로필retrieved 조회KakaoTalk 성공profile
		talkProfile = result.getContent(); // 로그인한 유저의 카카오톡 프로필 정보 The KakaoTalk profile information of the logged-in user
	} else if (result.getCode() == KGTResult.KGTResultCode.NOT_KAKAOTALK_USER) {
		// 로그인 한 유저가 '카카오톡' 유저가 아닙니다. 카카오 스토리만 가입한 유저의 계정과 같이 카카오톡 유저가 아닌 경우.
	}  The logged-in user is not a KakaoTalk user. This occurs if the account is only registered with KakaoStory and not with KakaoTalk.
	} else {
		// Failed 카카오톡to 프로필retrieve 조회KakaoTalk 실패profile
	}
});

...

Retrieving KakaoTalk Game Friend List

발췌문 삽입
EN_Kakao Integration Feature SDK Example
EN_Kakao Integration Feature SDK Example
namekakao_talk_friends
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTKakaoTalk;
import com.kakaogame.KGTKakaoFriendProfile;

// Retrieve 게임the list 친구of 목록game 조회하기friends
KGTKakaoTalk.friends(result -> {
	if (result.isSuccess()) {
		// 카카오톡Successfully retrieved 게임the 친구KakaoTalk 목록game 조회friends 성공list.
		List<KGTPlayer> friendList = result.getContent(); // 게임Game 친구friends 목록list
		
		for (KGTPlayer player : friendList) {
            KGTKakaoFriendProfile kakaoProfile = (KGTKakaoFriendProfile)player.getIdpProfile();
        }
	} else if (result.getCode() == KGTResult.KGTResultCode.NOT_KAKAOTALK_USER) {
		// 로그인The logged-in 유저가user '카카오톡'is 유저가not 아닙니다. 카카오 스토리만 가입한 유저의 계정과 같이 카카오톡 유저가 아닌 경우a KakaoTalk user. This occurs if the account is only registered with KakaoStory and not with KakaoTalk.
	} else {
		// Failed to 카카오톡retrieve 게임the 친구KakaoTalk 목록game 조회friends 실패list
	}
});

...

Sending KakaoTalk Game Messages

발췌문 삽입
EN_Kakao Integration Feature SDK Example
EN_Kakao Integration Feature SDK Example
namekakao_talk_send_game_message
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTKakaoFriendProfile;
import com.kakaogame.KGTKakaoTalk;
import com.kakaogame.KGTKakaoTalkProfile;

// friendsFriend object API를retrieved 통해through 가져온the 친구friends 객체API
KGTKakaoFriendProfile kakaoProfile; // 카카오Kakao profile 프로필(KGTKakaoFriendProfile 객체object)

// [TODO] 템플릿Set the IdTemplate 설정ID
String templateId = "";

// [TODO] Set the 메시지arguments 템플릿에for 설정한the 인자message 설정template
Map<String, String> args = new LinkedHashMap<>();
if (talkProfile != null) {
	args.put("${nickname}", talkProfile.getNickname());
}
args.put("rog_link", "test=100&hello=20111");
args.put("bruce2", "test=100&hello=20111");

// 카카오톡Send a 게임KakaoTalk 메시지game 보내기message
KGTKakaoTalk.sendGameMessage(kakaoProfile, templateId, args, result -> {
	if (result.isSuccess()) {
		// 카카오톡Successfully sent 채팅a 메시지KakaoTalk 보내기chat 성공message
	} else {
		if (result.getCode() == KGTResult.KGTResultCode.MESSAGE_SETTING_DISABLE) {
			// The recipient 받은이가has 메시지set 수신message 거부를reception 설정한to 경우disabled
		} else if (result.getCode() == KGTResult.KGTResultCode.EXCEED_DAILY_USAGE) {
			// 한명이The 특정daily 앱에quota 대해for 보낼sending messages 있는from 하루a 쿼터(받는 사람 관계없이) 초과시 발생single app has been exceeded (regardless of the recipient)
		} else if (result.getCode() == KGTResult.KGTResultCode.EXCEED_MONTHLY_USAGE) {
			// 한명이 특정 앱에 대해 특정인에게 보낼 수 있는 한달 쿼터 초과시 발생 The monthly quota for sending messages to a specific person from a single app has been exceeded
		} else {
			// Failed to 카카오톡send 채팅the 메시지KakaoTalk 보내기chat 실패message
		}
	}
});

...

Sending KakaoTalk Friend Invitation Messages

발췌문 삽입
EN_Kakao Integration Feature SDK Example
EN_Kakao Integration Feature SDK Example
namekakao_talk_send_invite_message
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTKakaoTalk;
import com.kakaogame.KGTKakaoTalkProfile;
import com.kakaogame.KGTKakaoUser;

// [TODO] 팝업창으로 띄울지 여부 설정Set whether to display as a popup
boolean isSingle = true;

// [TODO] 팝업창으로 띄울지 여부 설정 Set whether to display as a popup
boolean isPopup = true;
  
// [TODO] Set the 템플릿template Id
설정
String templateId = "";

// [TODO] Set 메시지the parameters 템플릿에for 설정한the 인자message 설정template
Map<String, String> args = new LinkedHashMap<>();
if (talkProfile != null) {
	args.put("${nickname}", talkProfile.getNickname());
}

KGTKakaoTalk.sendInviteMessage(activity, isSingle, isPopUp, templateId, args, result -> {
	if (result.isSuccess()) {
		// 카카오톡Successfully 초대sent 메시지KakaoTalk 보내기invite 성공message
		for (KGTKakaoUser kakaoUser : result.getContent()) {
			// 유저가 초대 메시지를 전송한 유저 목록 확인Check the list of users who received the invite message
		}
	} else {
		// 전부 실패한 경우(공통된 원인 리턴해주기 필요Failed to send to all users (need to return a common cause)
		if (result.getCode() == KGTResult.KGTResultCode.MESSAGE_SETTING_DISABLE) {
			// The recipient 받은이가has 메시지set 수신message 거부를reception 설정한to 경우disabled
		} else if (result.getCode() == KGTResult.KGTResultCode.EXCEED_DAILY_USAGE) {
			// 한명이 특정 앱에 대해 보낼 수 있는 하루 쿼터(받는 사람 관계없이) 초과시 발생 Occurs when a user exceeds the daily quota for sending messages from a specific app (regardless of the recipient)
		} else if (result.getCode() == KGTResult.KGTResultCode.EXCEED_MONTHLY_USAGE) {
			// 한명이 특정 앱에 대해 특정인에게 보낼 수 있는 한달 쿼터 초과시 발생 Occurs when a user exceeds the monthly quota for sending messages to a specific person from a specific app
		} else {
			// Failed 카카오톡to 초대send 메시지KakaoTalk 보내기invite 실패message
		}
	}
});

...

Adding a KakaoTalk Channel

발췌문 삽입
EN_Kakao Integration Feature SDK Example
EN_Kakao Integration Feature SDK Example
namekakao_talk_add_plus_friend
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTKakaoTalk;

// [TODO] Set the 채널channel Id 설정
int channelId = 0;

KGTKakaoTalk.addChannel(plusFriendId, result -> {
	if (result.isSuccess()) {
		// 채널Successfully added 추가the 성공channel
	} else if (result.getCode() == KGTResult.KGTResultCode.NOT_KAKAOTALK_USER) {
		// 로그인 한 유저가 '카카오톡' 유저가 아닙니다. 카카오 스토리만 가입한 유저의 계정과 같이 카카오톡 유저가 아닌 경우 The logged-in user is not a 'KakaoTalk' user. This occurs when the account is only registered with KakaoStory and not KakaoTalk.
	} else {
		// 채널 추가 실패/ Failed to add the channel
	}
});

구글 게임

...

Google Games

...

Show Achievement Screen

발췌문 삽입
EN_구글 게임 SDK 예제
EN_구글 게임 SDK 예제
namegoogle_games_show_achievement_view
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTGoogleGamesAchievements;

// 구글Show 게임Google 업적Games 정보achievement 화면information 보여주기screen
KGTGoogleGamesAchievements.showAchievement(activity);

...

Achievement Unlocked

발췌문 삽입
EN_구글 게임 SDK 예제
EN_구글 게임 SDK 예제
namegoogle_games_unlock
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTGoogleGamesAchievements;

// [TODO] 업적Set 아이디achievement 설정ID
String id = "";

// 업적Unlock 달성achievement
KGTGoogleGamesAchievements.unlock(id);

...

Display Achievement

발췌문 삽입
EN_구글 게임 SDK 예제
EN_구글 게임 SDK 예제
namegoogle_games_reveal
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTGoogleGamesAchievements;

// [TODO] 업적Set 아이디achievement 설정ID
String id = "";

KGTGoogleGamesAchievements.reveal(id);

...

Increase Achievement Level

발췌문 삽입
EN_구글 게임 SDK 예제
EN_구글 게임 SDK 예제
namegoogle_games_increment
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTGoogleGamesAchievements;

// [TODO] 업적Set 아이디achievement 설정ID
String id = "";
int numSteps = 0;

KGTGoogleGamesAchievements.setSteps(id, numSteps);

...

Set Achievement Level

발췌문 삽입
EN_구글 게임 SDK 예제
EN_구글 게임 SDK 예제
namegoogle_games_set_steps
nopaneltrue

코드 블럭
languagejava
import com.kakaogame.KGTGoogleGamesAchievements;

// [TODO] 업적Set 아이디achievement 설정ID
String id = "";
int numSteps = 0;

KGTGoogleGamesAchievements.increment(id, numSteps);