The Introduction of Advertising SDK english - Hiroaki-Shinoda/Geniee-Android-SDK GitHub Wiki

Start Guide

This guide explains how to install Geniee Ads SDK to Android application.

How to install:

  1. Download Geniee SDK
  2. Put jar-library
  3. Write Manifest file

Download Geniee SDK

Download Geniee Android SDK from following URL

Put jar-library

  1. Unzip Geniee Android SDK

  2. Add Ads-SDK to project

  • If it does not exit in libs folder, you have to create it
  • Copy GenieeAdsSDK / jar flies to libs folder.
    • GNAdSDK-<version_number>.jar
  • Right-Click on jar file moved to libs folder, and select 'Add as Library'.
  • Check to add app/build.gradle in 'dependencies'.
  • Check to add 'Project Structure' in 'Dependencies'.
  1. Add Google Play Services SDK to project
  • If Google Play Services SDK is already installed, No need to add.

  • How to add1 (Recommended)

  • How to add2

    • Copy jar file to libs folder.
      • google-play-services.jar
    • Copy google-play-services's version.xml to values folder.
    • Right-Click on jar file added, and select 'Add as Library'.
    • Check you have been added in 'dependencies' of app/build.gradle.
    • Check you have been added in 'Dependencies' of 'Project Structure'.
      image image
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:appcompat-v7:21.0.3'
        compile files('libs/google-play-services.jar')
        compile files('libs/GNAdSDK-2.0.9.jar')
    }
    

image

Coding Manifest file

Code information is needed to show file AndroidManifest.xml.

  1. Coding SDK use information of activity

    • Code in Manifest file's <application>.
    <activity android:name="jp.co.geniee.gnadsdk.banner.GNAdWebActivity"
    android:label="@string/app_name" android:screenOrientation="portrait"/>
    
    <activity android:name="jp.co.geniee.gnadsdk.interstitial.GNInterstitialActivity" 
    android:theme="@android:style/Theme.Translucent" 
    android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" 
    android:screenOrientation="behind"/>
    
    <activity android:name="jp.co.geniee.gnadsdk.video.GNVideoViewActivity" 
    android:theme="@android:style/Theme.Translucent" 
    android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" 
    android:screenOrientation="unspecified"/>
    
  2. Coding SDK use Google Play Services SDK's information

    • Code Manifest file's <application>.
    <meta-data android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version"/>
    
  3. Coding SDK use internet permissions

    <uses-permission android:name="android.permission.INTERNET"/>
    
  4. Coding SDK use Network Connection Status permissions.

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    
  5. Coding SDK use Google Play Services SDK permissions.

    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    
  6. Coding SDK use to get location information permission. (optional)

    • It is no problem coding either "ACCESS_COARSE_LOCATION" and "ACCESS_FINE_LOCATION"
    • If you don't use location information, no need to coding.
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>