Skip to main content

Integrate

To display ads and make a profit, the NAM SDK needs to be integrated into the app first.

Before starting

Use of the latest version of Android Studio is recommended.


Prerequisites

Apply NAM SDK

  1. Add core modules and extension modules for each DSP to be used in the build.gradle at the app level. (Add only the necessary modules)
dependencies {
implementation(platform("com.naver.gfpsdk:nam-bom:7.5.3"))
implementation("com.naver.gfpsdk:nam-core") // NAM SDK core (mandatory)
implementation("com.naver.gfpsdk:nam-nda") // Naver S2S extension
implementation("com.naver.gfpsdk:nam-dfp") // DFP extension
implementation("com.naver.gfpsdk:nam-fan") // FAN extension
implementation("com.naver.gfpsdk:nam-inmobi") // InMobi extension
implementation("com.naver.gfpsdk:nam-unity") // Unity extension
implementation("com.naver.gfpsdk:nam-applovin") // AppLovin(MAX) extension
implementation("com.naver.gfpsdk:nam-vungle") // Vungle extension
implementation("com.naver.gfpsdk:nam-dt") // DigitalTurbine(Fyber) extension
implementation("com.naver.gfpsdk:nam-aps") // AmazonPublisherServices(APS) extension
implementation("com.naver.gfpsdk:nam-ironsource") // IronSource extension
}
  1. Set the NAM Publisher Code and Service Code issued by a NAM Admin (or a NAM representative) in the AndroidManifest.xml file.
  • First, add the issued Publisher Code to the string.xml file to process the Publisher Code string.

    <string name="nam_publisher_cd">YOUR_PUBLISHER_CODE</string>
    <string name="nam_service_cd">YOUR_SERVICE_CODE</string>
  • Add a tag under the AndroidManifest.xml file tag. At this time, use com.naver.gfpsdk.PUBLISHER_CD and com.naver.gfpsdk.SERVICE_CD for the name. As for the value, use the string resource information added above.

    <manifest>
    <application>
    <meta-data
    android:name="com.naver.gfpsdk.PUBLISHER_CD"
    android:value="@string/nam_publisher_cd"/>
    <meta-data
    android:name="com.naver.gfpsdk.SERVICE_CD"
    android:value="@string/nam_service_cd" />
    </application>
    </manifest>
info

If you got a Publisher Code prior to v7.4.0, then you might not have a Service Code. In this case, enter only the Publisher Code.


Checklist

IronSource Module

Need to add the following repository to use IronSource SDK.

repositories {
maven {
url = uri("https://android-sdk.is.com/")
}
}

AppSetID

AppSetID helps user-tracking across each Publisher within the same device. To use the AppSet ID, add Dependency for the AppSet ID as shown below.

dependencies {
implementation("com.google.android.gms:play-services-appset:16.0.2") //optional dependency for better targeting
}

InMobi Module

The InMobi library internally uses the Picasso library.

When building, the com.android.support library is used. Therefore, problems related to AndroidX may occur.

When using the InMobi Module, please set android.enableJetifier=true in the gradle.properties file.

When Using the Google (DFP) Module

To initialize Google Ad Manager, the App ID must be set in the AndroidManifest.xml file.

Add a <meta-data> tag containing android:name="com.google.android.gms.ads.APPLICATION_ID.” The App ID can be found in the Google Ad Manager UI. Enter a unique Ad Manager App ID in quotes for android:value.

<manifest>
<application>
<!-- Sample Ad Manager app ID: ca-app-pub-3940256099942544~3347511713 -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
</application>
</manifest>
info

In the Real App, use the actual Ad Manager App ID, not the App ID listed above.

Check the Hardware Acceleration Settings for Native Ad Video Types

A black screen may appear when a Native Ad containing videos, such as the FAN module, is displayed.

If the target API level is 14 (Ice Cream Sandwich, Android 4.0.1) or higher, the hardware acceleration will be enabled by default. However, this function can be proposedly enabled at the app level or activity level.

Check the Network Security Configuration

(When the FAN module is used) Meta Audience Network SDK uses 127.0.0.1 (localhost) as a caching proxy for caching media files in the SDK.

Starting with Android P, plain text traffic (unencrypted HTTP) is blocked by default. As a result, the SDK media caching function will be affected. The user experience and advertisement revenue may also be impacted.


Mediation partner networks

C2S

  • DFP: Doubleclick for Publishers (Google Ads)
  • FAN: META(Facebook) Audience Network
  • InMobi
  • Unity
  • AppLovin
  • Vungle
  • DigitalTurbine
  • APS: Amazon Publisher Services
  • IronSource

S2s

  • NDA: Stands for NAVER Display Ads. Advertisements provided by NAVER as well as advertisements from external advertisement providers such as Pubmatic, AppNexus, and Rubicon are provided through the NDA module (s2s).
info

Refer to the supported advertisements below and consult with the NAM manager to confirm the DSP to be connected. Then, add each module.

Ad ProviderBannerNativeNative (without media view)RewardInterstitial
NDAOOOOX
DFPOOOOO
FANOOOOO
InMobiOOXXX
UnityO(320*50)XXOO
AppLovinOOOOO
VungleXXXOO
Digital TurbineOXXOO
APSOXXXX
IronSourceXXXOO
caution

For other C2S such as FAN, Ad ID (Ad Tracking ID) registration may be required to receive test advertisements.