Initialization and Status Change Event Processing SDK Example
Initialization and Status Change Event Processing
App Event Method Initialization (iOS Only)
This process initializes the SDK to handle AppDelegate methods.
It must be called within the AppDelegate class.
SDK Initialization
This process sets and initializes the app information used by the SDK.
It must be called before any other API when the game starts.
Start
When a game is started, it must call the Start function to notify the Kakao Game SDK that it has been started.
UI functions such as platform announcements, update news, and term agreements are performed when the Start function of the Kakao Game SDK is called.
If there exists a prior user login record, the automatic login function is also performed, and the result is sent through the callback function inputted in the game when the method is called.
Therefore, the game can use the results to decide whether to authenticate the user first or whether to resume a previous game.
Unity - Unity Client SDK API | Start
Unreal - Unreal Client SDK API | Start
Android -Android Client SDK API | Start
Windows - Windows Client SDK API | Start
Pause
If the game is moved to the background, the game must call the Pause API to notify the Kakao Game SDK that it has become inactive.
When the Pause API is called, the Kakao Game SDK disconnects the connected session and stops periodically sending heartbeats to prevent battery consumption.
Unity - Unity Client SDK API | Pause
Unreal - Unreal Client SDK API | Pause
Android - Android Client SDK API | Pause
Resume
If the game is moved back to the foreground from the background, it must call the Resume API to notify the Kakao Game SDK that it has become active.
The Kakao Game SDK checks whether the authentication has expired when the Resume method is called and restores the session depending on the check. The result is then sent through the callback function inputted in the game when the method is called.
The game can use the results to decide whether to authenticate the user again or whether to resume a previous game.
Unity - https://kakaogames.atlassian.net/wiki/spaces/KS4GFC/pages/788926851/EN_Unity+SDK+API#Resume
Unreal - https://kakaogames.atlassian.net/wiki/spaces/KS4GFC/pages/794066945/EN_Unreal+SDK+API#Resume
Android - https://kakaogames.atlassian.net/wiki/spaces/KS4GFC/pages/788926932/Android+Client+SDK+API#Resume
iOS - https://kakaogames.atlassian.net/wiki/spaces/KS4GFC/pages/788926969/iOS+Client+SDK+API#Resume
Setting Up Auto Login in a Windows Environment
This feature is supported in the Windows environment.
If you do not use the default login UI provided by the SDK and instead implement your own login UI, the SDK offers a feature to set up auto login.
If you do not configure auto login, the SDK will not create a file for automatic login by default.
The file for auto login is created and stored in an encrypted format in the folder ".kakaogames" under the name ".access". This is because multiple users can exist on a single PC."
When a game is uninstalled and then reinstalled, if the auto login file remains, the SDK checks whether an encrypted ".access" file exists in the location of the Windows SDK file (KakaoGame.dll). If the file is valid, the SDK loads the file containing the auto login information and performs the auto login.
If the auto login files are corrupted, the SDK will delete them.
If the auto login file exists and the user logs out or withdraws, the auto login file will be deleted.
Adding a new Intent receive setting
This setting is required if you are using the Android SDK directly.
Add a callback inside MainActivity of the game as shown below.
If you do not add this setting, there will be a problem checking your game's funnel through 'game-play' page on KakaoTalk. Please be sure to add.
And when using Unity, set the corresponding MainActivity as the main activity in Unity Assets / Plugins / Android / AndroidManifest.xml file.
(If you are using the KakaoGames Unity or Unreal SDK, this setting is configured automatically, so no additional setup is required.)