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:
- Download Geniee SDK
- Put jar-library
- Write Manifest file
Download Geniee SDK
Download Geniee Android SDK from following URL
Put jar-library
-
Unzip Geniee Android SDK
-
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'.
- Add Google Play Services SDK to project
-
If Google Play Services SDK is already installed, No need to add.
-
How to add1 (Recommended)
- Google Developers Official WebSite Setting Up Google Play Services
-
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'.
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') }
- Copy jar file to libs folder.
Coding Manifest file
Code information is needed to show file AndroidManifest.xml.
-
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"/>
- Code in Manifest file's
-
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"/>
- Code Manifest file's
-
Coding SDK use internet permissions
<uses-permission android:name="android.permission.INTERNET"/>
-
Coding SDK use Network Connection Status permissions.
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
-
Coding SDK use Google Play Services SDK permissions.
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
-
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"/>