Banner BuildPackage_Android_DFP English - mkaji-geniee/Geniee-SDK-Unity-Plugin GitHub Wiki

Android package build instructions

Please follow the build procedure below.

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

1. Addition of library with gradle

Introducing libraries with Maven

  1. Open File>BuildSettings ... on the menu bar and set the following.
  • Platform: Android
  • Build System: Gradle
  1. Make sure that the following library is created under Assets> Plugins> Android file to be used.
  • AndroidManifest.xml
  • mainTemplate.gradle
  1. Make sure that the Android Support file to be used has the following library created under Assets>Plugins>Android.

    • android.arch.core.common-1.0.0.jar
    • android.arch.lifecycle.common-1.0.0.jar
    • android.arch.lifecycle.runtime-1.0.0.aar
    • com.android.support.customtabs-26.1.0.aar
    • com.android.support.support-annotations-26.1.0.jar
    • com.android.support.support-compat-26.1.0.aar
    • com.android.support.support-core-ui-26.1.0.aar
    • com.android.support.support-core-utils-26.1.0.aar
    • com.android.support.support-fragment-26.1.0.aar
    • com.android.support.support-media-compat-26.1.0.aar
    • com.android.support.support-v4-26.1.0.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-basement-15.0.1.aar
    • com.google.android.gms.play-services-gass-15.0.1.aar
  2. Open PlayServicesResolver>Editor>GNDependencies and get the following to get GNAdSDK.

    <!-- GNAdSDK -->
    <androidPackage spec="jp.co.geniee.gnadsdk:GNAdSDK:4.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>
    
    • When implementing DFP banner mediation, the Geniee SDK must be version 3.2.1 or higher.

    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-4.0.0.aar
  3. Open PlayServicesResolver>Editor>GNDependencies and get the following to get GNAdDFPRewardMediationAdapter.

    <!-- GNAdDFPBannerMediationAdapter -->
    <androidPackage spec="jp.co.geniee.gnaddfpbannermediationadapter: GNAdDFPBannerMediationAdapter:4.0.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 Geniee SDK file to be used has the following library created under Assets>Plugins>Android.

    • jp.co.geniee.gnaddfpbannermediationadapter. GNAdDFPBannerMediationAdapter-4.0.0.0.aar

Manually installing libraries (Deprecated)

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

Manual introduction procedure here

Please add SDK below Assets> Plugins> directly under Android.

  • GNAdSDK-4.0.0.jar
  • GNAdDFPRewardMediationAdapter-4.0.0.0.jar

2. Edit AndroidManifest.xml

Manual introduction procedure here

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

Please add the following.

<application>
	<!-- Banner -->
	<activity android:name="jp.co.geniee.gnadsdk.banner.GNAdWebActivity"
	 android:label="@string/app_name" android:screenOrientation="portrait"/>
</application>

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- Optional permissions. Will pass Lat/Lon values when available. Choose either Coarse or Fine -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

3. Build procedure

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

4. About Hardware Acceleration Setting

If you want to display the banner's movie properly, hardware acceleration must be set.

<application android:hardwareAccelerated="true">
</application>

or

<activity android:hardwareAccelerated="true"/>
⚠️ **GitHub.com Fallback** ⚠️