Sie sind auf Seite 1von 13

Integration Tools

Documentation
Tools / Android / Interstitial SDK /
Admob

Version 25072016 | Appnext 2016

Tools / Android / Interstitial SDK / Admob

This guide will walk you through on how to integrate the Appnext Admob adapter for Interstitial unit,
in apps that are using the Admob SDK.
The guide is intended for developers with apps, in-which the AdMob monetization SDK is already
integrated, and it will explain how to integrate Appnext through AdMobs mediation, as a third-party
network.

Version 25072016 | Appnext 2016

Tools / Android / Interstitial SDK / Admob

Appnext Account & ID


1. Register for an Appnext Account:
You must first create an account with Appnext to be able to use this ad units features. If you
do not have an Appnext account, copy the following URL to the browser:
https://www.appnext.com and sign up
2. Get a Unique ID:
To get started add a new App via the Appnext Self-Service Platform, then copy the
Placement ID, which can be found in your account at: Apps -> Settings Icon-> Settings &
Placements -> Placement ID (make sure to copy the Placement ID for both Android and iOS
apps).
Unique ID explanation:A unique ID called a Placement ID is required for all inbound
requests. A Placement ID is a 32- character string generated by Appnext for every registered
app.
3. Integrate the AdMob SDK and register for a AdMob account:
Prior to this integration, you need to integrate the AdMob SDK into your app and add it to your
AdMob account.
Please refer to the integration instructions at the AdMob Site

Version 25072016 | Appnext 2016

Tools / Android / Interstitial SDK / Admob

Change log
25/07/2016
New release

Version 25072016 | Appnext 2016

Tools / Android / Interstitial SDK / Admob

Integrating the Appnext AdMob Adapter


Requirements
The Appnext AdMob Adapter supports Android 4.0+ when building for Android
The Appnext AdMob Adapter requires internet access to pull ads information for your app
Download the Appnext AdMob adapter:
Before starting the integration process, please download the following files:
Appnext SDK, from here
Appnext AdMob adapter, from here
unzip the adapter zip file in a folder of your choice.
The zip file includes the following components:
a. AppnextAdMobAdapter.jar the adapter jar file.
b. AdMobTestApp folder containing an Android application example project using the adapter.
c. CHANGELOG.md the adapter change log file.
Step 1: Add the Appnext AdMob Adapter and Appnext SDK files to your project
Add the AppnextAdMobAdapter.jar and AppnextAndroidSDK.jar to your libs folder in you project.
Step 2: Edit the AndroidManifest.xml file
You will need to edit the default manifest file in your project to properly use Appnext, you need to
make sure you allow the following permissions in your manifest:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
And add this service and activity declarations in your application tag:
<service android:name="com.appnext.core.DownloadService" />
<activity android:name="com.appnext.ads.interstitial.InterstitialActivity"
android:hardwareAccelerated="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
<activity android:name="com.appnext.ads.fullscreen.FullscreenActivity"
android:hardwareAccelerated="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
Note: you can find an example manifest file, in the example project
Step 3 (optional): Additional configuration
Advanced ad unit configuration

Version 25072016 | Appnext 2016

Tools / Android / Interstitial SDK / Admob

The Appnext SDK provides an option to change the ad units configuration.


By default, the SDK configuration will be loaded from Appnext's server, but you can choose to
change it directly by creating an InterstitialConfig object for Interstitial ad and call any of the
following setters before loading the ad by the AdMob loadAd interface:
InterstitialConfig config = new InterstitialConfig();
config.setButtonColor("#6AB344");
config.setButtonText("Install");
config.setPostback("Your_Postback_Params");
config.setCategories("Categories");
config.setSkipText("Skip");
config.setMute(false);
config.setBackButtonCanClose(false);
config.setAutoPlay(true);
config.setCreativeType(Interstitial.TYPE_MANAGED);
Bundle customEventExtras = new Bundle();
customEventExtras.putSerializable(AppnextAdMobCustomEvent.AppnextConfigurationExtraKey,
config);
AdRequest adRequest = new
AdRequest.Builder().addCustomEventExtrasBundle(AppnextAdMobCustomEventInterstitial.class,
customEventExtras).build();
mCustomisedCustomEventInterstitial.loadAd(adRequest);
ProGuard
Exclude Appnext from your proguard by using the line:
-keep class com.appnext.** { *; }
-dontwarn com.appnext.**

List of configuration options:


Button Text:
The install button's text (default is "Install'')
Button Color:
The install button's color a 6 hex chars starting with # (default is "#6AB344")
Skip button Text:

Version 25072016 | Appnext 2016

Tools / Android / Interstitial SDK / Admob

Set a custom text for the "skip'' button (default is "Skip'')


Category:
Set preferred ad categories
Install Postback:
Postback parameters that will be posted to your server after user installed an app (make sure to
encode the values)
Can Close:
"Back'' key can close the ad (default is "false'')
true
false
Mute Video:
Mute the video which is played in the Interstitial (default is "false'')
true
false
Auto Play Video:
Set video auto-play (default is "true'')
true
false
Creative Type:
Set creative type for the main section of the Interstitial (default "Interstitial.TYPE_MANAGED'')
Interstitial.TYPE_MANAGED
Interstitial.TYPE_VIDEO
Interstitial.TYPE_STATIC
Step 4: Login to your AdMob account and configure Appnext
As explained above, you must have an AdMob account, and an associated app within this account,
in order to integrate Appnext
Step 5: Select your app and click to monetize it
Within your AdMob account, press the Monetize tab and choose your app from the All apps
list:

Version 25072016 | Appnext 2016

Tools / Android / Interstitial SDK / Admob

Press the Monetize new app button in order to add your app to AdMob platform:

Step 6: Create an ad unit


Select your app for which you want to add a new ad unit from your app list on the left side
menu:

Click on New ad Unit from the app screen:

Version 25072016 | Appnext 2016

Tools / Android / Interstitial SDK / Admob

Configure your new ad unit


a. Choose Interstitial as the format of your ad unit
b. Enter a name for your ad unit
c. Click the Save button

Step 7: Add an ad source


Choose the Ad unit you want to add Appnexts custom event from the Ad units list by
pressing its ad sources link:

Version 25072016 | Appnext 2016

Tools / Android / Interstitial SDK / Admob

Press the + New ad network button In order to add Appnext:

Step 8: Add a custom event


In the New ad network page press the + Custom event button

Step 9: Configure the custom event


In the Custom Event details fill the following details:
a. Class Name should be:

Version 25072016 | Appnext 2016

Tools / Android / Interstitial SDK / Admob

10

com.appnext.admobadapter.AppnextAdMobCustomEventInterstitial
b. Label is just the name you give for Appnext ad network in this ad unit.
c. Parameter should be the Placement ID you copied in the previous steps from your
Appnext account

Finally press Continue in the bottom of the page.


Click the "Save'' button in the "Mediation'' page to save the newly added Ad Network:

Step 10: Configure eCPM


You should allocate the Appnext eCPM manually in order for Appnext to show ads in your AdMob
SDK.
You can configure the eCPM for the Appnext network in the Mediation page and press Save after
each change:

Step 11: Youre all done!


Your AdMob SDK should start showing Appnext ads immediately. If Appnext ads are not shown,
check the eCPM allocation and make sure its high enough so it will give Appnext priority.
Important Note

Version 25072016 | Appnext 2016

Tools / Android / Interstitial SDK / Admob

11

Each placement has a Placement ID. If you integrate multiple placements, you will need to use
a different Placement ID for each.

Integration Support
Should you have any problems integrating the product, log a ticket with us by emailing
support@appnext.com.

Version 25072016 | Appnext 2016

Tools / Android / Interstitial SDK / Admob

12

App Categories
Make sure to encode (%20) categories with more than 1 word, example: Travel%20%26%20Local
1. Action
2. Adventure
3. Arcade
4. Arcade & Action
5. Board
6. Books & Reference
7. Brain & Puzzle
8. Business
9. Card
10. Cards & Casino
11. Casino
12. Casual
13. Comics
14. Communications
15. Education
16. Educational
17. Entertainment
18. Family
19. Finance
20. Health & Fitness
21. Libraries & Demo
22. Lifestyle
23. Live Wallpaper
24. Media & Video
25. Medical
26. Music
27. Music & Audio
28. News & Magazines
29. Personalization

Version 25072016 | Appnext 2016

30. Photography
31. Productivity
32. Puzzle
33. Racing
35. Shopping
36. Simulation
37. Social
38. Sports
39. Sports Games
40. Strategy
41. Tools
42. Travel & Local
43. Trivia
44. Weather
45. Word

Tools / Android / Interstitial SDK / Admob

13

Das könnte Ihnen auch gefallen