Admob Adapter Integration For Android english - Hiroaki-Shinoda/Geniee-Android-SDK GitHub Wiki
You can deliver Geniee Ads from AdMob SDK using AdMob-Mediation-Adapter.
Features;
- Add Geniee AdNetwork to AdMob Advertising mediation
- Display delivered Ads from Geniee- AdServers in the AdMob SDK
- Setting Geniee App ID in AdMob ManagementScreen
- Display ClickCounts, Ads delivered from Geniee in AdMob-ReportScreen
-
Size Banner Ads 320×50
320x100
300x250 -
Refresh Ads Refresh ads according to refresh-seconds setting in AdMob.
-
How to operate Ads Tapped Ads then move to Ad's link forward.
-
Start how to Ad's link forward. Start from Default Browser App.
AdMob Adapter installation of SDK required for installation;
-
Introduction AdMob SDK
AdMob SDK StartGuide -
Implementation of AdMob SDK banner ads
Implementation of AdMob SDK banner ads -
Introduction Geniee SDK
Geniee SDK StartGuide
-
Setting AdMob Mediation
Set AdMob Mediation from AdMob-ManagementScreen.
How to Operate:Setting AdMob Mediation -
Create custom events in AdMob Mediation
You create custom events from AdMob-ManagementScreen.
You set Adapter Information to custom events.
How to Operate:Create Custom Events- Label : Ad network identification name, any setting possible. Example:Geniee
- Class :
jp.co.geniee.gnadsdk.banner.GNAdMediationAdapter
- Parameter : Geniee AppID,Log output flag (comma-separated and part of ",Log output flag" is optional)
-
Add GNAdMediationAdapter library
Add
GNAdMediationAdapter-(version_number).jar
under libAdsMediation/GNAdAdMobAdapter to project.- Copy the jar library to project libs folder.
- Right-click added jar file, and select 'Add as Library'.
- Copy the jar library to project libs folder.
- By implementing the AdMob SDK banner ads, you can deliver the mediation of advertising.
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.LinearLayout;
import com.google.android.gms.ads.*;
public class GNAdSampleAdMobAdapter extends ActionBarActivity {
private AdView adView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gnad_sample_admob_adapter);
// Create the adView.
adView = new AdView(this);
// Set MY_ADMOB_AD_UNIT_ID
adView.setAdUnitId("MY_ADMOB_AD_UNIT_ID");
adView.setAdSize(AdSize.BANNER);
// Add the AdView to the view hierarchy. The view will have no size
// until the ad is loaded. This code assumes you have a LinearLayout with
// attribute android:id="@+id/mainLayout" in your main.xml.
LinearLayout layout = (LinearLayout)findViewById(R.id.mainLayout);
layout.addView(adView);
// Start loading the ad in the background.
AdRequest adRequest = new AdRequest.Builder().build();
adView.loadAd(adRequest);
}
@Override
public void onDestroy() {
if (adView != null) {
adView.destroy();
}
super.onDestroy();
}
@Override
public void onPause() {
if (adView != null) {
adView.pause();
}
super.onPause();
}
@Override
public void onResume() {
super.onResume();
if (adView != null) {
adView.resume();
}
}
}