GoogleMobileAds Mediation Ad (Android Package Build Instructions)

Please follow the build procedure below.

  1. gradle addition with Library
    • Introducing libraries in Maven
    • Add library manually
  2. Edit AndroidManifest.xml
  3. Build procedure

1. Add library with gradle

  1. Open File>Build Settings ... on the menu bar and set the following.

    • Platform: Android
    • Build System: Gradle
  2. Make sure that the following library is created under Assets> Plugins> Android file to be used.

    • AndroidManifest.xml
    • mainTemplate.gradle
  3. Make sure that the Android Library file to be used has generated the following library in Assets/Plugins/Android/mainTemplate.gradle.

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.percentlayout:percentlayout:1.0.0'
implementation 'com.google.android.gms:play-services-ads:18.2.0'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
1
2
3
4
5
6
7
8
  1. Open PlayServicesResolver/Editor/GNDependencies and make sure that the following is written to get the GNAdSDK.
<!-- GNAdSDK -->
<androidPackage spec="jp.co.geniee.gnadsdk:GNAdSDK:8.5.1">
<androidSdkPackageIds>
    <androidSdkPackageId>extra-geniee-repository</androidSdkPackageId>
  </androidSdkPackageIds>
  <repositories>
    <repository>https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository</repository>
  </repositories>
</androidPackage>
1
2
3
4
5
6
7
8
9
10

Make sure that the following libraries are generated in the Geneese SDK file to be used in Assets/Plugins/Android/mainTemplate.gradle.

implementation 'jp.co.geniee.gnadsdk:GNAdSDK:8.5.1'
1
2
  1. Open PlayServicesResolver/Editor/GNDependencies and make sure you have the following to get GNAdGoogleMediationAdapter.
<!-- GNAdGoogleMediationAdapter -->
<androidPackage spec="jp.co.geniee.gnadgooglemediationadapter:GNAdGoogleMediationAdapter:8.5.0.0">
    <androidSdkPackageIds>
        <androidSdkPackageId>extra-geniee-repository</androidSdkPackageId>
    </androidSdkPackageIds>
    <repositories>
        <repository>https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository</repository>
    </repositories>
</androidPackage>
1
2
3
4
5
6
7
8
9
10

Make sure the Geniee SDK file to be used has the following libraries generated in Assets/Plugins/Android/mainTemplate.gradle.

implementation 'jp.co.geniee.gnadgooglemediationadapter:GNAdGoogleMediationAdapter:8.5.0.0'
1
2
  1. Open PlayServicesResolver/Editor/GNDependencies and add the following to introduce GNSFullscreenInterstitialAdapter. Change the description depending on the ad network.
    Perform this item only for interstitial.
GNSFullscreenInterstitialAdapter installation procedure
When introducing all ad networks at once
<!-- GNSFullscreenInterstitialAdapter All ADNW-->
<androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter:4.3.0">
    <androidSdkPackageIds>
        <androidSdkPackageId>extra-geniee-repository</androidSdkPackageId>
    </androidSdkPackageIds>
    <repositories>
        <repository>https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository</repository>
        <repository>http://fan-adn.github.io/nendSDK-Android-lib/library/</repository>
        <repository>https://imobile-maio.github.io/maven/</repository>
        <repository>https://github.com/zucks/ZucksAdNetworkSDK-Maven/raw/master/</repository>
    </repositories>
</androidPackage>
1
2
3
4
5
6
7
8
9
10
11
12
13

Make sure that the following libraries are generated in the Geneese SDK file to be used in Assets/Plugins/Android/mainTemplate.gradle.

implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-AppLovin:4.3.0'
implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Imobile:4.3.0'
implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Maio:4.3.0'
implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Nend:4.3.0'
implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Tapjoy:4.3.0'
implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-UnityAds:4.3.0'
implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Vungle:4.3.0'
implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Zucks:4.3.0'
1
2
3
4
5
6
7
8
9
Implementation of Maio
<!-- GNSFullscreenInterstitialAdapter Maio -->
<androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Maio:4.3.0">
    <androidSdkPackageIds>
        <androidSdkPackageId>extra-geniee-repository</androidSdkPackageId>
    </androidSdkPackageIds>
    <repositories>
        <repository>https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository</repository>
        <repository>https://imobile-maio.github.io/maven/</repository>
    </repositories>
</androidPackage>
1
2
3
4
5
6
7
8
9
10
11

Make sure the Geniee SDK file to be used has the following libraries generated in Assets/Plugins/Android/mainTemplate.gradle.

implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Maio:4.3.0'
1
2
Implementation of AppLovin
<!-- GNSFullscreenInterstitialAdapter AppLovin -->
<androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-AppLovin:4.3.0">
    <androidSdkPackageIds>
        <androidSdkPackageId>extra-geniee-repository</androidSdkPackageId>
    </androidSdkPackageIds>
    <repositories>
        <repository>https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository</repository>
    </repositories>
</androidPackage>
1
2
3
4
5
6
7
8
9
10

Make sure the Geniee SDK file to be used has the following libraries generated in Assets/Plugins/Android/mainTemplate.gradle.

implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-AppLovin:4.3.0'
1
2
Implementation of Nend
<!-- GNSFullscreenInterstitialAdapter Nend -->
<androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Nend:4.3.0">
    <androidSdkPackageIds>
        <androidSdkPackageId>extra-geniee-repository</androidSdkPackageId>
    </androidSdkPackageIds>
    <repositories>
        <repository>https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository</repository>
        <repository>http://fan-adn.github.io/nendSDK-Android-lib/library/</repository>
    </repositories>
</androidPackage>
1
2
3
4
5
6
7
8
9
10
11

Make sure the Geniee SDK file to be used has the following libraries generated in Assets/Plugins/Android/mainTemplate.gradle.

implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Nend:4.3.0'
1
2
Implementation of Zucks
<!-- GNSFullscreenInterstitialAdapter Zucks -->
<androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Zucks:4.3.0">
    <androidSdkPackageIds>
        <androidSdkPackageId>extra-geniee-repository</androidSdkPackageId>
    </androidSdkPackageIds>
    <repositories>
        <repository>https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository</repository>
        <repository>https://github.com/zucks/ZucksAdNetworkSDK-Maven/raw/master/</repository>
    </repositories>
</androidPackage>
1
2
3
4
5
6
7
8
9
10
11

Make sure the Geniee SDK file to be used has the following libraries generated in Assets/Plugins/Android/mainTemplate.gradle.

implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Zucks:4.3.0'
1
2
Implementation of Tapjoy
<!-- GNSFullscreenInterstitialAdapter Tapjoy -->
<androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Tapjoy:4.3.0">
<androidSdkPackageIds>
    <androidSdkPackageId>extra-geniee-repository</androidSdkPackageId>
</androidSdkPackageIds>
<repositories>
    <repository>https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository</repository>
</repositories>
</androidPackage>
1
2
3
4
5
6
7
8
9
10

Make sure the Geniee SDK file to be used has the following libraries generated in Assets/Plugins/Android/mainTemplate.gradle.

implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Tapjoy:4.3.0'
1
2
Implementation of UnityAds
<!-- GNSFullscreenInterstitialAdapter UnityAds -->
<androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-UnityAds:4.3.0">
<androidSdkPackageIds>
    <androidSdkPackageId>extra-geniee-repository</androidSdkPackageId>
</androidSdkPackageIds>
<repositories>
    <repository>https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository</repository>
</repositories>
</androidPackage>
1
2
3
4
5
6
7
8
9
10

Make sure the Geniee SDK file to be used has the following libraries generated in Assets/Plugins/Android/mainTemplate.gradle.

implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-UnityAds:4.3.0'
1
2
Implementation of Vungle
<!-- GNSFullscreenInterstitialAdapter Vungle -->
<androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Vungle:4.3.0">
<androidSdkPackageIds>
    <androidSdkPackageId>extra-geniee-repository</androidSdkPackageId>
</androidSdkPackageIds>
<repositories>
    <repository>https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository</repository>
</repositories>
</androidPackage>
1
2
3
4
5
6
7
8
9
10

Make sure the Geniee SDK file to be used has the following libraries generated in Assets/Plugins/Android/mainTemplate.gradle.

implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Vungle:4.3.0'
1
2
Implementation of Imobile
<!-- GNSFullscreenInterstitialAdapter Imobile -->
<androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Imobile:4.3.0">
<androidSdkPackageIds>
    <androidSdkPackageId>extra-geniee-repository</androidSdkPackageId>
</androidSdkPackageIds>
<repositories>
    <repository>https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository</repository>
</repositories>
</androidPackage>
1
2
3
4
5
6
7
8
9
10

Make sure the Geniee SDK file to be used has the following libraries generated in Assets/Plugins/Android/mainTemplate.gradle.

implementation 'jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Imobile:4.3.0'
1
2

Add the ad network library to be used from FullscreenInterstitial-Adnws-Android-SDK directly under Assets/Plugins/Android.

  • imobileSdkAds_2.0.20

    ※ Please check with your sales representative for FullscreenInterstitial-Adnws-Android-SDK.

Manually installing libraries

If you followed the Introducing libraries with Maven procedure, you do not need to do this step.

Manual introduction procedure here

Please add SDK below Assets>Plugins>Android directory.

  • GNAdSDK-8.5.1.jar
  • GNSFullscreenInterstitialAdapter-AppLovin-4.3.0.jar
  • GNSFullscreenInterstitialAdapter-Zucks-4.3.0.jar
  • GNSFullscreenInterstitialAdapter-Nend-4.3.0.jar
  • GNSFullscreenInterstitialAdapter-Maio-4.3.0.jar
  • GNSFullscreenInterstitialAdapter-UnityAds-4.3.0.jar
  • GNSFullscreenInterstitialAdapter-Tapjoy-4.3.0.jar
  • GNSFullscreenInterstitialAdapter-Vungle-4.3.0.jar
  • GNSFullscreenInterstitialAdapter-Imobile-4.3.0.jar

Please add the library of the ad network to be used from FullscreenInterstitial-Adnws-Android-SDK to Assets>Plugins>Android.

  • applovin-sdk-9.14.5.aar
  • maio-1.1.13.aar
  • nend-sdk-5.4.2.aar
  • ZucksAdNetworkSDK-4.7.0.jar
  • tapjoyconnectlibrary-12.7.0.jar
  • publisher-sdk-android-6.8.0.jar
  • unity-ads-3.4.8.aar
  • imobileSdkAds_2.0.20.jar

※ For details on FullscreenInterstitial-Adnws-Android-SDK, please contact your sales representative.

2. Edit AndroidManifest.xml

Edit Assets -> Plugins -> Android -> AndroidManifest.xml.

Perform this item only for interstitial

Add the following depending on the added ad network.

applovin

<!-- AppLovin -->
<meta-data
     android:name="applovin.sdk.key"
     android:value="YOUR_APPLOVIN_SDK_KEY_HERE" />
1
2
3
4
5
  • Please add AppLovinSDK key to android: value.
    • Name: applovin.sdk.key
    • Please check with your sales representative for Applovin key.

tapjoy

<!-- 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

vungle

<!--Vungle Activities-->
<activity
   android:name="com.vungle.warren.ui.VungleActivity"
   android:configChanges="keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize"
   android:launchMode="singleTop"
   android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
<activity
   android:name="com.vungle.warren.ui.VungleFlexViewActivity"
   android:configChanges="keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize"
   android:hardwareAccelerated="true"
   android:launchMode="singleTop"
   android:theme="@android:style/Theme.Translucent.NoTitleBar" />
   
<!--Vungle Required Permissions-->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!--Optional Permissions-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

3. ビルド手順

  1. Select File -> Build Settings from the menu bar.
  2. Select Platform's Android.
  3. BuildSystem: Select Gradle.
  4. If you have not edited the Bundle Identifier, etc., press Player Settings and edit the required setting items.
  5. You can check the package build by Build & Run.
  • Unity Preferences -> If you do not describe the paths of SDK andJDK of External Tools, please write before you create the package.
Last Updated: 11/10/2020, 2:55:13 PM