/
Android Client SDK API
Android Client SDK API
- 1 Initialization and Status Change Event Processing
- 1.1 SDK Initialization
- 1.2 Start
- 1.3 Pause
- 1.4 Resume
- 1.5 Adding a New Intent Receive Setting
- 2 Login
- 3 Logout
- 4 Unregistration
- 5 Account Linking
- 6 Profile
- 7 System Information
- 8 Kakao Integration Feature
- 8.1 Setting Up KakaoTalk Game Message Reception
- 8.2 Retrieve KakaoTalk Profile
- 8.3 Retrieve KakaoTalk Game Friend List
- 8.4 Sending KakaoTalk Game Messages
- 8.5 Sending KakaoTalk Friend Invitation Messages
- 8.6 Adding a KakaoTalk Channel
- 8.7 Retrieve the list of friends to whom I sent an invite message
- 8.8 Retrieve the count of friends to whom I sent an invite message
Initialization and Status Change Event Processing
SDK Initialization
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
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) {
// The current Player's ID 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, retry the start or close 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 other errors occur, provide an error notification and request a retry of the start process. - If the issue persists, check the error code and logs to determine the cause.
}
}
});
Pause
import com.kakaogame.KGTApplication;
import com.kakaogame.KGTResult;
KGTApplication.pause(activity, result -> {
//
});
Resume
Adding a New Intent Receive Setting
Login
Logging In Without Using the Default Login UI
Logout
Logging Out Without Using the Default Logout UI
Unregistration
Unregistering Without Using the Default Unregistration UI
Account Linking
Linking Accounts Without Using the Default Account Linking UI
Profile
Retrieve My Information
Retrieve My IDP Information
System Information
Retrieve Language Code
Retrieve Language Tag
Retrieve Country Code
Retrieve IP-based Country Code
Retrieve Device ID
Retrieve Device Model
Retrieve OS Name
Retrieve Network Connection Status
Retrieve Connected Network Type
Kakao Integration Feature
Setting Up KakaoTalk Game Message Reception
Retrieve KakaoTalk Profile
Retrieve KakaoTalk Game Friend List
Sending KakaoTalk Game Messages
Sending KakaoTalk Friend Invitation Messages
Adding a KakaoTalk Channel
Retrieve the list of friends to whom I sent an invite message
Retrieve the count of friends to whom I sent an invite message
, multiple selections available,
Related content
iOS Client SDK API
iOS Client SDK API
More like this
Android 클라이언트 SDK API
Android 클라이언트 SDK API
More like this
Unity Client SDK API
Unity Client SDK API
More like this
Windows Client SDK API
Windows Client SDK API
More like this
Unity 클라이언트 SDK API
Unity 클라이언트 SDK API
More like this
Unreal Client SDK API
Unreal Client SDK API
More like this