Tapjoyの実装

全画面インタースティシャル広告のメディエーション設定をするための、Tapjoyの実装手順を記載します。

実装手順:

  1. Mavenでライブラリを導入する
  2. 手動でライブラリを導入する
  3. マニフェストファイルの記述

Mavenでライブラリを導入する(推奨)

  1. Project>build.gradleallprojects>repositoriesに以下を追加します。

    allprojects {
    	repositories {
          	google()     	
    		// GenieeSDK
    		maven { 
    			url 'https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository' 
    		}
    		// Tapjoy SDK
    		maven {
    			url "https://tapjoy.bintray.com/maven"
    		}
    	}
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
  2. Module>build.gradledependenciesに以下を追加します。

dependencies {	
   // Geniee
   implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Tapjoy:4.3.0'
}
  1. 実装例
  • Project>build.gradle
   allprojects {
      	repositories {
      		google()
      		jcenter()
      			
      		// GenieeSDK
      		maven { 
      			url 'https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository'
      		}
      		// Tapjoy SDK
      		maven {
      			url "https://tapjoy.bintray.com/maven"
      		}
      	}
  }    
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  • Module>build.gradle
dependencies {	
    // Google SDK
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.1'
    implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'
    // Geniee
    implementation 'jp.co.geniee.gnadsdk:GNAdSDK:8.5.1 // GenieeSDK
    implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Tapjoy:4.3.0'
}

手動でライブラリを導入する

Mavenでライブラリを導入するの手順を実行した場合、この手順は実行する必要はありません。

手動導入手順はこちら

Geniee Adapter SDK のダウンロード

以下の URL から Geniee Android SDK をダウンロードします。

手動でライブラリを導入するで必要なFullscreenInterstitial-Adnws-Android-SDKについては、営業担当者にご確認ください。

Localライブラリの配置

  1. Geniee Android SDK を解凍します。

  2. プロジェクトにGNSFullscreenInterstitialAdapterを追加します。

  • libs フォルダーが存在しない場合、必要に応じて作成します。

  • libs フォルダにGNSFullscreenInterstitialAdapterフォルダ配下の以下ファイルをコピーします。
    - GNSFullscreenInterstitialAdapter-Tapjoy-4.3.0.jar

  • libs フォルダにFullscreenInterstitial-Adnws-Android-SDKフォルダ配下の以下ファイルをコピーします。
    - tapjoyconnectlibrary-12.7.0.jar

  • Project/build.gradleallprojects> repositoriesに追加します。

      allprojects {
          repositories {
              flatDir {
                  dirs 'libs'
              }
          }
       }
    
    1
    2
    3
    4
    5
    6
    7
  • Module/build.gradledependenciesに追加します。

    dependencies {
    	implementation fileTree(include: ['*.jar'], dir: 'libs')
    	implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    }
    
    1
    2
    3
    4

マニフェストファイルの記述

マニフェストファイル AndroidManifest.xml に必要情報を記述します。

  1. Mavenでライブラリを導入するの手順を実行した場合、この手順は実行する必要はありません。

    手動導入手順はこちら
    • マニフェストファイルの<application>にSDKが使用するアクティビティの情報を記述します。
    <!-- Tapjoy -->
    <activity
        android:name="com.tapjoy.TJAdUnitActivity"
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:hardwareAccelerated="true"
        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    <activity
        android:name="com.tapjoy.TJContentActivity"
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:theme="@android:style/Theme.Translucent.NoTitleBar"
        android:hardwareAccelerated="true" />
    		
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
Last Updated: 2020/9/4 17:53:11