Android Banner 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 Library file to be used has generated the following library in Assets/Plugins/Android/mainTemplate.gradle.
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.android.gms:play-services-ads:18.2.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
1
2
3
  1. Open PlayServicesResolver/Editor/GNDependencies and get the following to get 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
  • When implementing GoogleMobileAds banner mediation, the Geniee SDK must be version 3.2.1 or higher.

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 get the following to get GNAdGoogleMediationAdapter.
<androidPackage spec="jp.co.geniee.gnadgooglemediationadapter:GNAdGoogleMediationAdapter:{{$version.android.googleMediationAdapter}}">
<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

Please make sure that the Geniee SDK file to be used has the following library created under Assets>Plugins>Android.

implementation 'jp.co.geniee.gnadgooglemediationadapter:GNAdGoogleMediationAdapter:8.5.0.0'
1
2

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-8.5.1.jar
  • GNAdGoogleMediationAdapter-8.5.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"/>
1
2
3
4
5
6
7
8
9
10
11

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 andJDK 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>
1
2
Last Updated: 7/21/2020, 4:39:55 PM