Adobe AIR


This section explains the configuration and initialization effort required for SDK integration of Adobe AIR game. After complete the efforts described in this section, please continue the integration effort for other function module.

Adobe AIR Plugin is opened for partner only, Please contact support@ktplay.com for more information.

Setting Up a Development Environment

1. Import the KTPlay native extension into your AIR app

If you’re using Flash Builder, just following Adobe's guideline to add ktplay.ane to your project.

2.Add the extension information to your Application's descriptor file

Add the extensionID declaration to your AIR application descriptor's application element.

<extensions>
    <extensionID>com.ktplay.ane</extensionID>
</extensions>

3. Add Android Manifest additions to your Application's descriptor file

If you’ll be building for Android, you must also add these manifest additions to your AIR application descriptor's manifestAdditions element.

<application android:hardwareAccelerated="true" android:supportsRtl="true">
<activity android:name="com.ktplay.activity.KTMPermissionsActivity"
            android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
        </activity>

        <!-- From SDK 3.0 -->
        <activity android:name="com.ktplay.activity.KTShareActivity"
            android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
        </activity>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

4. Add IOS Info additions to your Application's descriptor file

If you’ll be building for iOS, you must also add these Info additions to your AIR application descriptor's InfoAdditions element.

<key>NSPhotoLibraryUsageDescription</key>
<string>Allow access your photos so you can share them with other players.</string>
        
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Allow access your album to save photos.</string>

SDK Initialization

1. Import the KTPlay classes.

import com.ktplay.ane.*;

2. Initialize SDK

Call KTPlay.startWithAppKey method to initialize KTPlay SDK.

KTPlay.startWithAppKey("Your App Key","Your App Secret");
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.