목차 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
1. Installation Environment
...
|
3.2.
...
SigninWithApple Authentication Information Setup
Add the following resource file and set the values in src/main/res/values/kakao_game_facebooksiwa_auth.xml.
The value for "Facebook App KeySIWA Client ID" needs to be replaced with the issued key from Apple.
The value for "Facebook Client Token" can be found at the following: https://kakaogames.atlassian.net/wiki/spaces/KS3GFP/pages/411861845/2.1#2.1.2.-%ED%8E%98%EC%9D%B4%EC%8A%A4%EB%B6%81-%EA%B0%9C%EB%B0%9C%EC%9E%90-%EC%84%BC%ED%84%B0(%ED%81%B4%EB%9D%BC%EC%9D%B4%EC%96%B8%ED%8A%B8-%ED%86%A0%ED%81%B0-%ED%99%95%EC%9D%B8)---SDK-3.15.0-%EC%9D%B4%EC%83%81-%EB%B2%84%EC%A0%84-%EC%A0%81%EC%9A%A9-%EC%8B%9C-%EC%84%A4%EC%A0%95-%ED%95%84%EC%9A%94
res/values/kakao_game_facebook_auth.xml
...
코드 블럭 |
---|
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="facebook_app_id">[Facebook App Key]</string>
<string name="facebook_client_token">[Facebook Client Token]</string>
<!--
The "public_profile" and "email" permissions are defined by default for Facebook authentication.
If additional read permissions are required, add them to the item below.
Publish permissions cannot be added.
-->
<string-array name="facebook_read_pemissions">
<item></item>
</string-array>
</resources>
|
3.3. Google Authentication Information Setup
Add the following resource file and set the values in src/main/res/values/kakao_game_google_auth.xml.
The values for "Google App ID" and "Google Web Client ID" need to be replaced with the issued keys.
res/values/kakao_game_google_auth.xml
...
코드 블럭 |
---|
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="kg_google_app_id">[Google App ID]</string>
<string name="kg_google_web_app_client_id">[Google Web Client ID]</string>
</resources>
|
3.4. SigninWithApple Authentication Information Setup
Add the following resource file and set the values in src/main/res/values/kakao_game_siwa_auth.xml.
The value for "SIWA Client ID" needs to be replaced with the issued key from Apple.
res/values/kakao_game_siwa_auth.xml
...
코드 블럭 |
---|
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="siwa_client_id">[SIWA Client ID]</string>
</resources>
|
3.5. Twitter Authentication Information Setup
Add the following resource file and set the values in src/main/res/values/kakao_game_twitter_auth.xml.
The values for "Twitter Consumer Key" and "Twitter Consumer Secret" need to be replaced with the issued keys from Twitter.
res/values/kakao_game_twitter_auth.xml
...
코드 블럭 |
---|
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="twitter_consumer_key">[Twitter Consumer Key]</string>
<string name="twitter_consumer_secret">[Twitter Consumer Secret]</string>
</resources>
|
4. AndroidManifest.xml File Configuration
The AndroidManifest.xml file of the game app must be configured with the following settings.
4.1. Common Settings
Set the minimum supported SDK version to 23 or higher
android:minSdkVersion="23"
Set the SDK target version to 31.
Explicit declaration for android:exported is required.
The SDK commonly uses the following permissions
android.permission.INTERNET
android.permission.ACCESS_NETWORK_STATE
Add settings for handling multiple screens.
To support screen splitting on Android phones and foldable phones, add the following to the application settings.
android:resizeableActivity="true"
Add the following to each added Activity.
android:configChanges="orientation|screenSize|keyboard|screenLayout|screenSize|smallestScreenSize"
For API 23 and above, you can specify whether the app uses cleartext network traffic, such as plain text HTTP.
android:usesCleartextTraffic="true"
Add URLScheme
The main Activity of the game should include the following intent filter settings.
The scheme is composed of "kakaogame" + the app ID. (For example, if the app ID is 123456, the scheme value will be "kakaogame123456")
AndroidManifest.xml (Common Settings)
...
코드 블럭 |
---|
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- KakaoGame SDK START -->
<uses-sdk
android:minSdkVersion="23"
android:targetSdkVersion="31" />
<!-- KakaoGame SDK END -->
<!-- KakaoGame SDK START -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- KakaoGame SDK END -->
<application
android:usesCleartextTraffic="true"
android:resizeableActivity="true">
<!-- MainActivity START : Included only in the publishing guide: Start -->
<activity android:name="com.companyname.MainActivity"
android:configChanges="orientation|screenSize|keyboard|screenLayout|screenSize|smallestScreenSize"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="sensor"
android:exported=”true” >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="kakaogame[App Id]" />
</intent-filter>
...
</activity>
<!-- MainActivity END : Included only in the publishing guide: End -->
</application>
</manifest>
|
4.2. Kakao Authentication Configuration
The main Activity must include the following intent filter declaration.
You need to declare AuthCodeHandlerActivity and add its intent filter.
For Android 12, the exported attribute must be explicitly declared.
AndroidManifest.xml (Kakao Authentication Configuration)
...
res/values/kakao_game_siwa_auth.xml
|
4. AndroidManifest.xml File Configuration
The AndroidManifest.xml file of the game app must be configured with the following settings.
4.1. Common Settings
Set the minimum supported SDK version to 23 or higher
android:minSdkVersion="23"
Set the SDK target version to 31.
Explicit declaration for android:exported is required.
The SDK commonly uses the following permissions
android.permission.INTERNET
android.permission.ACCESS_NETWORK_STATE
Add settings for handling multiple screens.
To support screen splitting on Android phones and foldable phones, add the following to the application settings.
android:resizeableActivity="true"
Add the following to each added Activity.
android:configChanges="orientation|screenSize|keyboard|screenLayout|screenSize|smallestScreenSize"
For API 23 and above, you can specify whether the app uses cleartext network traffic, such as plain text HTTP.
android:usesCleartextTraffic="true"
Add URLScheme
The main Activity of the game should include the following intent filter settings.
The scheme is composed of "kakaogame" + the app ID. (For example, if the app ID is 123456, the scheme value will be "kakaogame123456")
AndroidManifest.xml (Common Settings)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4.
...
2.
...
Kakao Authentication Configuration
The declaration for SignInHubActivity must be added.
The meta-data declarations for com.google.android.gms.version/com.google.android.gms.games.APP_ID must be added.
If you hardcode a number for APP_ID, authentication will fail. It should be written in the form of "@string/google_app_id"main Activity must include the following intent filter declaration.
You need to declare AuthCodeHandlerActivity and add its intent filter.
For Android 12, the exported attribute must be explicitly declared.
AndroidManifest.xml (Google Kakao Authentication Configuration)
|
|
|
|
|
|
|
|
|
4.4. Facebook Authentication Configuration
The declaration for FacebookActivity must be added.
The meta-data declaration for com.facebook.sdk.ApplicationId must be added.
The meta-data declaration for com.facebook.sdk.ClientToken must be added.
AndroidManifest.xml (Facebook Authentication Configuration)
...
코드 블럭 |
---|
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" >
<application>
<!-- Facebook Auth START -->
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />
<meta-data
android:name="com.facebook.sdk.ClientToken"
android:value="@string/facebook_client_token" />
<!-- Facebook Auth END -->
</application>
</manifest>
|
4.5. Twitter Authentication Configuration
The declaration for TwitterOAuthActivity must be added.
AndroidManifest.xml (Twitter Authentication Configuration)
|
4.
...
3. HTTP Usage Configuration
If targetSdkVersion is set to version 28 or higher and the game uses HTTP communication, the following configuration is necessary.
...
Setting the domain that requires HTTP calls
Create the res/xml/network_security_config.xml file and add the domain that requires HTTP communication.
network_security_config.xml
코드 블럭 <?xml version="1.0" encoding="utf-8"?> <network-security-config> <domain-config cleartextTrafficPermitted="true"> <!-- Add Your Http Domain --> <domain includeSubdomains="true">example.com</domain> </domain-config> </network-security-config>
In the Application section of the AndroidManifest.xml, set the file created above as networkSecurityConfig.
AndroidManifest.xml
코드 블럭 <application android:networkSecurityConfig="@xml/network_security_config">
4.
...
4. Game Supported Language Resources
If there are additional language packs in the library that are not supported by the game, and you want to remove them, you can delete the corresponding folder at the location below.
...
Verify that the project builds successfully.