...
코드 블럭 | ||
---|---|---|
| ||
import com.kakaogame.KGTKakaoTalk; // Display the view to set KakaoTalk game message reception preferences KGTKakaoTalk.showSetting(activity, result -> { if (result.isSuccess()) { // Successfully set the KakaoTalk game message reception settings boolean allowMessage = result.getContent(); // Whether message reception is allowed as per the settings } else if (result.getCode() == KGTResult.KGTResultCode.NOT_KAKAOTALK_USER) { // The logged-in user is not a 'KakaoTalk' user. This occurs when the user is notonly aregistered KakaoTalkwith user,KakaoStory suchand as in the case of a user who is only registered for KakaoStorynot KakaoTalk. } else { // Failed to set the KakaoTalk game message reception settings } }); |
...
코드 블럭 | ||
---|---|---|
| ||
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 when the user is notonly aregistered KakaoTalkwith user,KakaoStory suchand as in the case of a user who is only registered for KakaoStorynot KakaoTalk. } else { // Failed to retrieve KakaoTalk profile } }); |
...
코드 블럭 | ||
---|---|---|
| ||
import com.kakaogame.KGTKakaoTalk; import com.kakaogame.KGTKakaoFriendProfile; // Retrieve the list of game friends KGTKakaoTalk.friends(result -> { if (result.isSuccess()) { // Successfully retrieved 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 when the user is notonly aregistered KakaoTalkwith user,KakaoStory suchand as in the case of a user who is only registered for KakaoStorynot KakaoTalk. } else { // Failed to retrieve KakaoTalk game friends list } }); |
...
코드 블럭 | ||
---|---|---|
| ||
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 user is notonly aregistered KakaoTalkwith user,KakaoStory suchand as in the case of a user who is only registered for KakaoStorynot KakaoTalk. } else { // Failed to add the channel } }); |
...