FullscreenInterstitial BuildPackage_Android_Eng - mkaji-geniee/Geniee-SDK-Unity-Plugin GitHub Wiki
Please follow the build procedure below.
- Library addition with gradle
- Manual library addition
- Edit AndroidManifest.xml
- Build procedure
Introducing libraries with gradle
-
Open
File>Build Settingson the menu bar and set the following.- Platform:
Android - Build System:
Gradle
- Platform:
-
Make sure that the following library is created under Assets> Plugins> Android file to be used.
- AndroidManifest.xml
- GNSExtendsUnityPlayerActivity.jar
- mainTemplate.gradle
-
Make sure that the Android Support file to be used has the following library created under Assets> Plugins> Android.
- android.arch.core.common-1.1.0.jar
- android.arch.core.runtime-1.1.0.aar
- android.arch.lifecycle.common-1.1.0.jar
- android.arch.lifecycle.livedata-core-1.1.0.aar
- android.arch.lifecycle.runtime-1.1.0.aar
- android.arch.lifecycle.viewmodel-1.1.0.aar
- com.android.support.animated-vector-drawable-27.1.1.aar
- com.android.support.appcompat-v7-27.1.1.aar
- com.android.support.cardview-v7-27.1.1.aar
- com.android.support.constraint.constraint-layout-1.1.2.aar
- com.android.support.constraint.constraint-layout-solver-1.1.2.jar
- com.android.support.customtabs-27.1.1.aar
- com.android.support.percent-27.1.1.aar
- com.android.support.recyclerview-v7-27.1.1.aar
- com.android.support.support-annotations-27.1.1.jar
- com.android.support.support-compat-27.1.1.aar
- com.android.support.support-core-ui-27.1.1.aar
- com.android.support.support-core-utils-27.1.1.aar
- com.android.support.support-fragment-27.1.1.aar
- com.android.support.support-media-compat-27.1.1.aar
- com.android.support.support-v4-27.1.1.aar
- com.android.support.support-vector-drawable-27.1.1.aar
- com.google.android.gms.play-services-ads-15.0.1.aar
- com.google.android.gms.play-services-ads-base-15.0.1.aar
- com.google.android.gms.play-services-ads-identifier-15.0.1.aar
- com.google.android.gms.play-services-ads-lite-15.0.1.aar
- com.google.android.gms.play-services-base-15.0.1.aar
- com.google.android.gms.play-services-basement-15.0.1.aar
- com.google.android.gms.play-services-gass-15.0.1.aar
- com.google.android.gms.play-services-gcm-15.0.1.aar
- com.google.android.gms.play-services-iid-15.0.1.aar
- com.google.android.gms.play-services-location-15.0.1.aar
- com.google.android.gms.play-services-places-placereport-15.0.1.aar
- com.google.android.gms.play-services-stats-15.0.1.aar
- com.google.android.gms.play-services-tasks-15.0.1.aar
-
Open
PlayServicesResolver > Editor > GNDependenciesand get the following to get GNAdSDK.<!-- GNAdSDK --> <androidPackage spec="jp.co.geniee.gnadsdk:GNAdSDK:5.1.0"> <androidSdkPackageIds> <androidSdkPackageId>extra-geniee-repository</androidSdkPackageId> </androidSdkPackageIds> <repositories> <repository>https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository</repository> </repositories> </androidPackage>Please make sure that the Geniss SDK file to be used has the following library created under Assets> Plugins> Android.
- jp.co.geniee.gnadsdk.GNAdSDK-5.1.0.aar
-
Open
PlayServicesResolver>Editor> GNDependenciesand addGNSFullscreenInterstitialAdapterby adding the following. We will change the description by Ad Network.When installing all the ad networks collectively
<!-- GNSFullscreenInterstitialAdapter All ADNW--> <androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter:2.0.0"> <androidSdkPackageIds> <androidSdkPackageId>extra-geniee-repository</androidSdkPackageId> </androidSdkPackageIds> <repositories> <repository>https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository</repository> <repository>https://jitpack.io/</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> <repository>https://jitpack.io/</repository> </repositories> </androidPackage>Please make sure that the Geniss SDK file to be used has the following library created under
Assets> Plugins>Android.- jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-2.0.0.aar
- jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-AppLovin-2.0.0.aar
- jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-Maio-2.0.0.aar
- jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-Nend-2.0.0.aar
- jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-Zucks-2.0.0.aar
- jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-Tapjoy-2.0.0.aar
- jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-UnityAds-2.0.0.aar
- jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-Vungle-2.0.0.aar
- jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-Imobile-2.0.0.aar
Please confirm that the following network is created under
Assets>Plugins>Androidfor the ad network SDK file to be used.- net.zucks.zucks-ad-network-sdk-4.6.1.jar
- com.applovin.applovin-sdk-8.1.0.jar
- com.maio.android-sdk-1.1.6.aar
- net.nend.android.nend-sdk-5.0.2.aar
- com.tapjoy.tapjoy-android-sdk-12.0.0.aar
- com.unity3d.ads.unity-ads-2.3.0.aar
- com.github.vungle.vungle-android-sdk-6.3.17.aar
Introduction of Maio
<!-- GNSFullscreenInterstitialAdapter Maio --> <androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Maio:1.0.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>Please make sure that the Geniss SDK file to be used has the following library created under
Assets> Plugins>Android.- jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-Maio-1.0.0.aar
Please confirm that the following network is created under
Assets>Plugins>Androidfor the ad network SDK file to be used.- com.maio.android-sdk-1.1.6.aar
Introduction of AppLovin
<!-- GNSFullscreenInterstitialAdapter AppLovin --> <androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-AppLovin:1.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>Please make sure that the Geniss SDK file to be used has the following library created under
Assets> Plugins>Android.-
jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-AppLovin-1.0.0.aar
-
com.applovin.applovin-sdk-8.1.0.jar
Introduction of Nend
<!-- GNSFullscreenInterstitialAdapter Nend --> <androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Nend:1.0.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>Please make sure that the Geniss SDK file to be used has the following library created under
Assets> Plugins>Android.-
jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-Nend-1.0.0.aar
-
net.nend.android.nend-sdk-5.0.2.aar
Introduction of Zucks
<!-- GNSFullscreenInterstitialAdapter Zucks --> <androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Zucks:1.0.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>Please make sure that the Geniss SDK file to be used has the following library created under
Assets> Plugins>Android.-
jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-Zucks-1.0.0.aar
-
net.zucks.zucks-ad-network-sdk-4.6.1.jar
Introduction of Tapjoy
<!-- GNSFullscreenInterstitialAdapter Tapjoy --> <androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Tapjoy:2.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>Please make sure that the Geniss SDK file to be used has the following library created under
Assets> Plugins>Android.-
jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-Tapjoy-2.0.0.aar
-
com.tapjoy.tapjoy-android-sdk-12.0.0.aar
Introduction of UnityAds
<!-- GNSFullscreenInterstitialAdapter UnityAds --> <androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-UnityAds:2.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>Please make sure that the Geniss SDK file to be used has the following library created under
Assets> Plugins>Android.-
jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-UnityAds-2.0.0.aar
-
com.unity3d.ads.unity-ads-2.3.0.aar
Introduction of Vungle
<!-- GNSFullscreenInterstitialAdapter Vungle --> <androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Vungle:2.0.0"> <androidSdkPackageIds> <androidSdkPackageId>extra-geniee-repository</androidSdkPackageId> </androidSdkPackageIds> <repositories> <repository>https://raw.github.com/geniee-ssp/Geniee-Android-SDK/master/repository</repository> <repository>https://jitpack.io/</repository> </repositories> </androidPackage>Please make sure that the Geniss SDK file to be used has the following library created under
Assets> Plugins>Android.-
jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-Vungle-2.0.0.aar
-
com.github.vungle.vungle-android-sdk-6.3.17.aar
Introduction of Imobile
<!-- GNSFullscreenInterstitialAdapter Imobile --> <androidPackage spec="jp.co.geniee.gnsfullscreeninterstitialadapter:GNSFullscreenInterstitialAdapter-Imobile:2.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>Please make sure that the Geniss SDK file to be used has the following library created under
Assets> Plugins>Android.- jp.co.geniee.gnsfullscreeninterstitialadapter.GNSFullscreenInterstitialAdapter-Imobile-2.0.0.aa
Please add the library of the ad network to be used from
FullscreenInterstitial-Adnws-Android-SDKto Assets> Plugins> directly under Android.- imobileSdkAds_2.0.20
※ For details on
FullscreenInterstitial-Adnws-Android-SDK, please contact your sales representative.
If you followed the Installing libraries with Maven procedure, you do not need to do this step.
Click here for the manual installation procedure
Please add SDK below Assets> Plugins> directly under Android.
- GNAdSDK-X.X.X.jar
- GNSFullscreenInterstitialAdapter-AppLovin-2.0.0.jar
- GNSFullscreenInterstitialAdapter-Zucks-2.0.0.jar
- GNSFullscreenInterstitialAdapter-Nend-2.0.0.jar
- GNSFullscreenInterstitialAdapter-Maio-2.0.0.jar
- GNSFullscreenInterstitialAdapter-UnityAds-2.0.0.jar
- GNSFullscreenInterstitialAdapter-Tapjoy-2.0.0.jar
- GNSFullscreenInterstitialAdapter-Vungle-2.0.0.jar
- GNSFullscreenInterstitialAdapter-Imobile-2.0.0.jar
Please add the library of the ad network to be used from FullscreenInterstitial-Adnws-Android-SDK to Assets> Plugins> directly under Android.
- applovin-sdk-8.1.0.jar
- maio-1.1.6.aar
- nend-sdk-5.0.2.aar
- ZucksAdNetworkSDK-4.6.1.jar
- tapjoyconnectlibrary-12.0.0.jar
- vungle-android-sdk-6.3.17.jar
- unity-ads-2.3.0.aar
- imobileSdkAds_2.0.20.jar
※ For details on FullscreenInterstitial-Adnws-Android-SDK, please contact your sales representative.
Edit Assets -> Plugins -> Android -> AndroidManifest.xml.
Add the following depending on the added ad network.
<!-- AppLovin -->
<meta-data
android:name="applovin.sdk.key"
android:value="YOUR_APPLOVIN_SDK_KEY_HERE" />
- Add AppLovinSDK key to
android: value.- Name: applovin.sdk.key
- Please check with your sales representative for
Applovin key.
<!-- 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.mraid.view.ActionHandler"
android:configChanges="orientation|keyboardHidden|screenSize" />
<activity
android:name="com.tapjoy.mraid.view.Browser"
android:configChanges="orientation|keyboardHidden|screenSize" />
<activity
android:name="com.tapjoy.TJContentActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:hardwareAccelerated="true" />
<!--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" />
- Select File -> Build Settings from the menu bar.
- Select Platform's Android.
- BuildSystem: Select "Gradle".
- If you have not edited Bundle Identifier etc., press
Player Settingsand edit the necessary setting items. - You can check the package build by
Build & Run.
- Unity Preferences -> If you do not describe the paths of
SDKandJDKof External Tools, please write before you create the package.
This UnityPlugin uses the Activity which inherited UnityPlayerActivity so that ad processing can be done when OnStart, OnResume, OnPause of Android Lifecycle. . If you want to use your own Activity, add the following method and interface to your own Activity. . And please set the interface name before doing ad processing (loading advertisement etc.).
- Method, interface to add to Activity
private LifecycleListener lifecycleListener;
// Method to set the Listener. Method names and parameters are as follows and do not change.
public void setLifecycleListener(LifecycleListener listener) {
this.lifecycleListener = listener;
}
// Add listener processing to do processing on onStart.
@Override
protected void onStart() {
if (this.lifecycleListener != null) {
this.lifecycleListener.onStart();
}
super.onStart();
}
// Add listener processing to do processing with onResume.
@Override
protected void onResume() {
if (this.lifecycleListener != null) {
this.lifecycleListener.onResume();
}
super.onResume();
}
// Add listener processing to do processing with onPause.
@Override
protected void onPause() {
if (this.lifecycleListener != null) {
this.lifecycleListener.onPause();
}
super.onPause();
}
// Add listener processing to do processing with onStop.
@Override
protected void onStop() {
if (this.lifecycleListener != null) {
this.lifecycleListener.onStop();
}
super.onStop();
}
// Please make a listener with the following three methods defined.
public interface LifecycleListener {
void onStart();
void onResume();
void onPause();
void onStop();
}
- Setting the interface name
// The class name is defined in the example. Please replace it with the name of the created interface.
GNSAdSDK.Android.Utils.LifecycleListenerClassName = "jp.co.geniee.utgnsrewardvideo.ExtendsUnityPlayerActivity$LifecycleListener";