Integrating nend with Mediation

This guide is for publishers who want to use the Google Mobile Ads SDK to load and display ads from nend via mediation. It explains how to add nend to an ad unit's mediation configuration, how to set up ad network optimization, and how to integrate the nend SDK and adapter into an Android app.

The dashboard interface for nend uses Japanese text for its labels, buttons, and descriptions, and the screenshots displayed below have not been translated. In this guide, labels and buttons are referred to by their English equivalents. "URL スキーム," for example, is "URL Scheme," and so on.

Supported formats and features

The Ad Manager mediation adapter for nend has the following capabilities:

Formats
Banners
Interstitials
Rewarded Video
Rewarded Video (new APIs)
Features
Smart Banners
Automatic Data Collection

Requirements

  • Android SDK 4.0 (API level 14) or later
  • Google Play services 17.2.0 or later

Step 1: Set up nend

Sign up or sign in to your nend account.

To add your application to the nend dashboard, first click on the Placement Management tab, and then select Site/App. Click the Add an app button to add your app to nend.

Create an application

Enter the name of your app and choose Android application as the application type. Enter the URL and check if your app is in the Play store (see nend's unreleased apps FAQ if your app has not yet been released). Select a category for your app and click Create when done.

Your application will be shown on the dashboard once it is created.

Create a placement

Once the app is registered, you can move on to creating a placement. To create a placement for banner ads, go to the Placement Management tab and click on Placement. Then click the Create a new placement button.

Select the tab below corresponding to your preferred ad format.

Banner

First, select your app in the drop-down menu. Next, choose still image for the Ad type, and banner for the Inventory type. Once that's done, enter a Placement name, choose a format, and finally choose your desired banner size. When finished, click the Create button to create your placement.

Note that the banner size chosen here should match the size requested by your app.

Interstitial

Create Inventory for your interstitial placement by first selecting your app name in the drop-down menu. Next, for the Ad type select Still image, and for the Placement type select Interstitial. Once that's done, enter a Placement name and select an Advertisement display frequency from the drop-down list. Finally, click the Create button to create your placement.

For interstitial video ads, select Video for the Ad type, then select Interstitial as the Inventory type. Once that's done, enter a Placement name and select a Category from the drop-down list. Finally, click the Create button to create your placement.

Rewarded video

Create Inventory for your rewarded placement by first selecting your app in the drop-down menu. Next, set the Ad type to Video and Inventory type to Rewards. When that's done, enter a Placement name and Description, then choose an appropriate Category in the drop-down list.

Select Rewarded for the Content type using the drop-down list, enter your preferred Virtual currency name, and then click the Create button to create your placement.

To set up your Ad Manager ad unit in the next section, you'll need the apiKey and spotID for each placement. To locate them, head to the Placement Management tab and select the SDK button under the name of your app.

Take note of the apiKey and spotID.

You'll also need your API Key for nend's reporting API, which they call the API Key for Scraping. You can find it in the Tools tab.

Step 2: Configure mediation settings for your Ad Manager ad unit

Sign in to your Ad Manager account. Navigate to Delivery > Yield groups and click the New yield group button.

Enter a unique Name for your yield group, set the Status to Active, select your Ad Format, and set the Inventory type to Mobile App. Under the Targeting > Inventory section, select the Ad Unit ID to which you want to add mediation.

Next, click the Add yield partner button.

If you already have a Yield partner for nend, you can simply select it. Otherwise, select Create a new yield partner.

Select nend as the Ad network and enter a unique Name. Enable Mediation and turn on Automatic data collection, and enter the API Key for Scraping obtained in the previous section as the Reporting API Key. You don't need to enter a Username and Password. Click Save when done.

Once the Yield partner is selected, choose Mobile SDK mediation as the Integration type, Android as the Platform, and Active as the Status. Enter the Slot ID and the API Key obtained in the previous section and a Default CPM value.

Click Save at the bottom of the page when done.

Using rewarded video ads

In the settings for your rewarded video ad unit, provide values for the reward amount and reward type. Then, to ensure you provide the same reward to the user no matter which ad network is served, check the Override reward settings from third-party ad networks when using mediation box.

If you don't apply this setting, the nend adapter passes back the reward specified in the nend dashboard.

Step 3: Import the nend SDK and adapter

Add the following nend Maven repository and implementation dependencies with the latest version of the nend SDK and adapter in the app-level build.gradle file:

repositories {
    maven {
        url 'http://fan-adn.github.io/nendSDK-Android-lib/library'
    }
}

...
dependencies {
    implementation 'com.google.android.gms:play-services-ads:18.3.0'
    implementation 'com.google.ads.mediation:nend:5.2.0.0'
}
...

Manual integration

Download the latest version of the nend Android SDK and add it to your project. Download the latest .aar file of the adapter from Bintray and add it to your project.

Step 4: Additional code required

No additional code is required for nend integration.

Step 5: Test your implementation

To get test ads for banners, interstitials, and rewarded, nend recommends using the API keys and Spot IDs provided in the nend test ad units page. These can be entered as the API Keys and Spot IDs for your AdMob ad units while testing, and then replaced with an actual API Key and Spot ID when your app is ready for production.

Optional steps

Network-specific parameters

The nend adapter supports additional request parameters for interstitial ads that can be passed to the adapter using the NendExtrasBundleBuilder class. This class includes the following methods:

  • setUserId(String) - Sets the UserID of a specific nend interstitial ad.
  • setInterstitialType(InterstitialType) - Nend provides the option of selecting either TYPE_VIDEO or TYPE_NORMAL.

JAVA

Bundle bundle = new NendAdapter.NendExtrasBundleBuilder().setUserId(
  "userId").setInterstitialType(InterstitialType.TYPE_NORMAL).build();

PublisherAdRequest adRequest = new PublisherAdRequest.Builder().addNetworkExtrasBundle(
  NendAdapter.class, bundle).build();

adLoader.loadAd(adRequest);

KOTLIN

val bundle = NendAdapter.NendExtrasBundleBuilder().setUserId(
  "userId").setInterstitialType(InterstitialType.TYPE_NORMAL).build()

val adRequest = PublisherAdRequest.Builder().addNetworkExtrasBundle(
  NendAdapter.class, bundle).build()

adLoader.loadAd(adRequest)

nend Android Mediation Adapter Changelog

Version 5.3.0.0

  • Verified compatibility with nend SDK 5.3.0.
  • Updated the minimum required Google Mobile Ads SDK version to 18.2.0.

Built and tested with

  • Google Mobile Ads SDK version 18.2.0.
  • Nend SDK version 5.3.0.

Version 5.2.0.0

  • Verified compatibility with nend SDK 5.2.0.
  • Updated the minimum required Google Mobile Ads SDK version to 18.1.1.

Version 5.1.0.4

  • Fixed an issue where Banner and Interstitial ads were not forwarding the onAdClicked() event.
  • Fixed an issue where a NullPointerException was thrown when a nend Banner ad was destroyed.
  • Migrated the adapter to AndroidX.
  • Updated the minimum required Google Mobile Ads SDK version to 18.0.0.

Version 5.1.0.3

  • Added implementation to display a part of nend banner in SmartBanner. Appropriate size for SmartBanner
    • Portrait and Landscape
      • Phones: 320×50
      • Tablets: 728×90 or 320×50

Version 5.1.0.2

  • Added support for flexible banner ad sizes.

Version 5.1.0.1

  • Updated adapter to support new open-beta Rewarded API.
  • Updated the minimum required Google Mobile Ads SDK version to 17.2.0.

Version 5.1.0.0

  • Verified compatibility with nend SDK 5.1.0.

Version 5.0.2.1

  • Removed function that forward user features because following methods are deprecated on AdRequest.Builder.
    • setGender()
    • setBirthday()
    • setIsDesignedForFamiles()

Version 5.0.2.0

  • Verified compatibility with nend SDK 5.0.2.

Version 5.0.1.0

  • Verified compatibility with nend SDK 5.0.1.

Version 5.0.0.0

  • Verified compatibility with nend SDK 5.0.0.

Version 4.0.5.0

  • Verified compatibility with nend SDK 4.0.5.

Version 4.0.4.1

  • Supported onRewardedVideoCompleted() method of RewardedVideoAdListener.

Version 4.0.4.0

  • Verified compatibility with nend SDK 4.0.4.

Version 4.0.2.1

  • Added the ability to create a Bundle of mediation extras using the NendExtrasBundleBuilder class.

Version 4.0.2.0

  • First release in Google Mobile Ads Mediation open source project.
  • Added support for banner, interstitial, and rewarded video ads.