1. TnkAd SDK‎ > ‎

7) AD+ Settings

[AD+ SDK Download] 

 v1.01 (2016.07.05)  Download
   - Tnk SDK v6.26 is applied

 * AD+ SDK for iOS is not supported now. Use TnkSDK for iOS. (See 4) iOS Settings )

[Add Library]

  - Eclipse
  • Unzip SDK file you downloaded (tnk_adplus.zip) and import into your Eclipse workspace as a project.
  • In your project, Select Menu -> Properties -> Android and add tnk_adplus library.
  
  • Unity plugin and Cocos2dx plugin for TnkSDK has tnkad-sdk.jar. This jar file is also in the AD+ library. So you have to delete the tnkad-sdk.jar in your project. 

[Menifest Settings]  

  • You can get App ID(Application Id) after adding your app in Tnk site. 
  • Put the App ID in <meta-data/> inside of <application/> tag at AndroidMenifest.xml file.
  • In the sample below, replace your-application-id-from-tnk-site with your App ID value.
  • Set tnkad_adplus meta-data to 'true' in order to AD+ SDK work.

meta-tag

meta-tag

<application>

     ...

    <meta-data android:name="tnkad_app_id" android:value="your-application-id-from-tnk-site" />

  <meta-data android:name="tnkad_adplusandroid:value="true" />

</application>

  • Put 2 permissions.

<uses-permission> tag

<uses-permission> tag

<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />


  • Add 2 Activities. AdWallActivity for Incentive offer wall  and AdMediaActivity for video ad.
  • Set screenOrientation as you want.

<Activity> tag

<Activity> tag

<!-- 가로 화면인 경우 설정-->
<activity android:name="com.tnkfactory.ad.AdWallActivity" android:screenOrientation="landscape"/>
<activity android:name="com.tnkfactory.ad.AdMediaActivity" android:screenOrientation="landscape"/>

<!-- 또는 아래와 같이 설정-->
<activity android:name="com.tnkfactory.ad.AdWallActivity" android:screenOrientation="sensorLandscape"/>
<activity android:name="com.tnkfactory.ad.AdMediaActivity" android:screenOrientation="sensorLandscape"/>

<!-- 세로 화면은 아래와 같이 설정 -->
<activity android:name="com.tnkfactory.ad.AdWallActivity" android:screenOrientation="portrait"/>
<activity android:name="com.tnkfactory.ad.AdMediaActivity" android:screenOrientation="portrait"/>

  • Set minSdkVersion to 9 or greater.

minSdkVersion

minSdkVersion

<uses-sdk android:minSdkVersion="9" />


  • Sample AndroidMenifest.xml

Sample

Sample

<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"

    package="com.tnkfactory.showcase"

    android:versionCode="1"

    android:versionName="1.0" >


    <uses-sdk

        android:minSdkVersion="9"

        android:targetSdkVersion="19" />


    <uses-permission android:name="android.permission.INTERNET" />

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    

    <application

        android:allowBackup="true" android:icon="@drawable/icon" android:label="@string/app_name"

        >

        <activity android:name=".MainActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar" android:label="@string/app_name" >

            <intent-filter>

                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />

            </intent-filter>

        </activity>

        

        <activity android:name="com.tnkfactory.ad.AdWallActivity" android:screenOrientation="portrait"/>

        <activity android:name="com.tnkfactory.ad.AdMediaActivity" android:screenOrientation="portrait"/>

        

        <meta-data android:name="tnkad_app_id" android:value="e0f0e0e0-00e1-c48f-f84c-1e000c08020d" />

        <meta-data android:name="tnkad_adplus" android:value="true" />

    </application>

</manifest>


[Proguard 사용]

  If you are to use Proguard, make sure below line is in your Proguard configuration file.

    -keep class com.tnkfactory.** { *;}

[적용 가이드]

How to apply incentive offer wall, interstitial Ad and video Ad is same to the way in TnkSDK. See each guide in TnkSDK.
Comments