23.1. KakaoTalk Game Message SDK Example

23.1. KakaoTalk Game Message SDK Example

 


23.1.1. Setting KakaoTalk Game Message Receipt

This section shows an example of setting up whether the user will receive KakaoTalk game messages.

Unity

using KakaoGame.SDK; using KakaoGame.SDK.Kakao;   // Displaying the setting view for KakaoTalk game message receipt KGKakaoTalkMessage.ShowAllowMessageSettingView(     (result, isAllowed) => {         if (result.isSucces) {             // KakaoTalk game message receipt setup successful         }         else {             // KakaoTalk game message receipt setup failed         }     });

Android

// Displaying the setting view for KakaoTalk game message receipt KGKakaoTalkMessage.showAllowMessageSettingView(activity, new KGResultCallback<Boolean>() {     @Override     public void onResult(KGResult<Boolean> result) {         if (result.isSuccess()) {             // KakaoTalk game message receipt setup successful             boolean allowMessage = result.getContent(); // Configured message receipt option         } else {             // KakaoTalk game message receipt setup failed         }     } });

iOS

#import <KakaoGame/KakaoGame.h>   // Displaying the setting view for KakaoTalk game message receipt [KGKakaoTalkMessage showAllowMessageSettingViewWithCompletionHandler:^(NSError *error, BOOL isAllowedMessage) {     if (IS_SUCCESS(error) == YES)     {         // KakaoTalk game message receipt setup successful         BOOL _isAllowedMessage = isAllowedMessage; // Configured message receipt option     }     else     {         // KakaoTalk game message receipt setup failed     } }];

Windows Sync

Windows Async

Unreal

23.1.2. Querying KakaoTalk Game Friend List

This section shows an example of a query of the KakaoTalk game friend list.

Unity

Android

iOS

Windows Sync

Windows Async

Unreal

23.1.3. Sending a KakaoTalk Game Message

This section shows an example of KakaoTalk game message sending.  (Guide : https://kakaogames.atlassian.net/wiki/spaces/KS3GFC/pages/414253141 )

If you want to receive certain parameters when entering the game by touching the received message, you can set and use the exec parm in the message template.

When you receive the message with KakaoTalk and touch the link to the app, the app is executed and the exec param is passed.

You can use this value to start a specific stage or pay a predefined item. The exec parm can only use game messages.

 

Unity Example

Android Example

iOS Example

Windows Sync

Windows Async

Unreal

23.1.4. Sending a KakaoTalk game image message

This is an example of sending a KakaoTalk game image message. (Guide :https://kakaogames.atlassian.net/wiki/spaces/KS3GFC/pages/414253141 )

[Android] Using a dangerous permission feature

If you want to use this feature, you need to add the READ_EXTERNAL_STORAGE permission to Android Manifest.

Android 6.0+ games may use this feature after the user's permission is obtained, using the guide on the notification of individual rights and right request.

Unity Example

Android Example

iOS Example

Windows Sync

Windows Async

Unreal