Select platform: [Android (beta)
![New](https://developers.google.com/static/admob/images/new.svg)](https://developers.google.com/admob/android/next-gen/mediation/line "View this page for the Android (beta) platform docs.") [Android](https://developers.google.com/admob/android/mediation/line "View this page for the Android platform docs.") [iOS](https://developers.google.com/admob/ios/mediation/line "View this page for the iOS platform docs.") [Unity](https://developers.google.com/admob/unity/mediation/line "View this page for the Unity platform docs.") [Flutter](https://developers.google.com/admob/flutter/mediation/line "View this page for the Flutter platform docs.")

<br />

This guide shows you how to use Google Mobile Ads SDK to load and display
ads from LINE Ads Network using [AdMob Mediation](https://developers.google.com/admob/android/mediation),
covering waterfall integrations. It covers how to add LINE Ads Network to an
ad unit's mediation configuration, and how to integrate the LINE Ads Network
SDK and adapter into an Android app.

The dashboard interface for LINE Ads Network uses Japanese text for its labels,
buttons, and descriptions. The screenshots in this guide have not been
translated. In this guide's descriptions and instructions however, labels and
buttons are translated with their English language equivalents in parentheses.

## Supported integrations and ad formats

The mediation adapter for LINE Ads Network has the following capabilities:

| Integration ||
|---|---|
| Bidding |   |
| Waterfall |   |
| Banner |   |
| Interstitial |   |
| Rewarded |   |
| Native | [^1^](https://developers.google.com/admob/android/mediation/line#bidding-native-ad-footnote) |

^1^
Native ads (for Bidding) is in closed beta, reach out to your account manager to
request access.

## Requirements

- Android API level 23 or higher

<!-- -->

- Latest Google Mobile Ads SDK

- Complete the mediation [Get started guide](https://developers.google.com/admob/android/mediation)

## Step 1: Set up configurations in LINE Ads Network UI

[Sign up](https://pages.linebiz.com/line-ads-network/) and
[log in](https://partner.fivecdm.com/login) to your LINE Ads Network account.

### Add a new application

Click **広告枠管理 (Ad Slot Management)** \> **メディア (Media)** . Then, click
**新規作成 (Create New)**.

![](https://developers.google.com/static/admob/images/mediation/line/create_new.png)

Fill out the form and click **登録 (Register)**.

![](https://developers.google.com/static/admob/images/mediation/line/app_details.png)

Take note of the Application ID.

![](https://developers.google.com/static/admob/images/mediation/line/app_id.png)

### Create an ad placement

Click the ID of the application you want to add an ad placement. Then,
select **詳細 (Detail)**.

![](https://developers.google.com/static/admob/images/mediation/line/ad_placement.png)

Click **スロット 追加 (Add Slot)**.

![](https://developers.google.com/static/admob/images/mediation/line/add_slot.png)

Fill out the form for details about the slot. For **Bidding Type** , select
**Standard** to configure this slot for waterfall mediation, or
**Google SDK Bidding** to configure this slot for Bidding.
Click **登録 (Register)** once the form is filled.
| **Note:** The **フォーマット (Format)** and **Bidding Type** cannot be changed after registering the slot. Reach out to your LINE Ads Network account manager to get access to create native ad placements in the LINE Ads Network UI.

![](https://developers.google.com/static/admob/images/mediation/line/ad_slot_details.png)

Take note of the **Slot ID**.

![](https://developers.google.com/static/admob/images/mediation/line/ad_slot_id.png)

### Update your app-ads.txt


[Authorized Sellers for Apps app-ads.txt](https://iabtechlab.com/wp-content/uploads/2019/03/app-ads.txt-v1.0-final-.pdf) is an IAB Tech Lab initiative that helps ensure your
app ad inventory is only sold through channels you've identified as authorized. To prevent a
significant loss in ad revenue, you'll need to implement an `app-ads.txt` file.

If you haven't done so already,

[set up an app-ads.txt file for your app](https://support.google.com/admob/answer/9363762).

To implement `app-ads.txt` for LINE Ads Network, see
[About app-ads.txt](https://adsnetwork-docs.linebiz.com/fivesdk-android/store-release/app-ads-txt.html).

## Step 2: Set up LINE Ads Network demand in AdMob UI

### Configure mediation settings for your ad unit

You need to add LINE Ads Network to the
mediation configuration for your ad unit.

First, sign in to your [AdMob account](https://apps.admob.com/). Next, navigate to the
**Mediation** tab. If you have an existing mediation group you'd like to modify,
click the name of that mediation group to edit it, and skip ahead to
[Add LINE Ads Network as an ad source](https://developers.google.com/admob/android/mediation/line#add-ad-source).

To create a new mediation group, select **Create Mediation Group**.

![](https://developers.google.com/static/admob/images/mediation/admob-mediation-group-create.png)

Enter your ad format and platform, then click **Continue**.

![](https://developers.google.com/static/admob/images/mediation/admob-mediation-group-new-Android.png)

Give your mediation group a name, and select locations to target. Next, set the
mediation group status to **Enabled** , and then click **Add Ad Units**.

![](https://developers.google.com/static/admob/images/mediation/admob-mediation-group-details-Android.png)

Associate this mediation group with one or more of your existing
AdMob ad units. Then click **Done**.

![](https://developers.google.com/static/admob/images/mediation/admob-ad-units-select-Android.png)

You should now see the ad units card populated with the ad units you selected:

![](https://developers.google.com/static/admob/images/mediation/admob-ad-units-card-Android.png)

#### Add LINE Ads Network as an ad source

### Bidding

Under the **Bidding** card in the **Ad Sources** section, select **Add
ad source** . Then select **LINE Ads Network** .  

Click **How to sign a partnership agreement** and [set up a bidding partnership](https://support.google.com/admob/answer/9842838) with LINE Ads Network.   

![](https://developers.google.com/static/admob/images/mediation/line/bidding-agreement-1.png)   

Click **Acknowledge \& agree** , then click **Continue** .   

![](https://developers.google.com/static/admob/images/mediation/line/bidding-agreement-2.png)   

If you already have a mapping for LINE Ads Network, you can select it. Otherwise, click **Add mapping** .   

![](https://developers.google.com/static/admob/images/mediation/line/bidding-add-mapping-1-Android.png)   

Next, enter the **Application ID** and **Slot ID** obtained in the previous section. Then click **Done** .   

| **Important** : The **Application ID** must be associated with the targeted app as in the LINE Ads Network UI.

<br />

![](https://developers.google.com/static/admob/images/mediation/line/bidding-add-mapping-2-Android.png)

### Waterfall

<br />

Under the **Waterfall** card in the **Ad Sources** section, select **Add Ad
Source** .  

Select **LINE Ads Network** and enable the **Optimize** switch. Enter the **Login name** and **Password** obtained in the previous section to set up ad source optimization for LINE Ads Network. Then enter an **eCPM value** for LINE Ads Network and click **Continue** .  

![](https://developers.google.com/static/admob/images/mediation/line/admob-add-ad-network.png)  
| **Note**: You only need to set up ad source optimization once per network.

If you already have a mapping for LINE Ads Network, you can select it. Otherwise, click **Add mapping** .  
![](https://developers.google.com/static/admob/images/mediation/line/waterfall-add-mapping-1-Android.png)  
Next, enter the **Application ID** and **Slot ID** obtained in the previous section. Then click **Done** .  
| **Important** : The **Application ID** must be associated with the targeted app as in the LINE Ads Network UI.

![](https://developers.google.com/static/admob/images/mediation/line/waterfall-add-mapping-2-Android.png)  
| **Note** : Ad source optimization takes a few days to gather enough data to accurately calculate eCPM for a mediation network. In the meantime, the ad source optimization status is `PENDING`, so you must manually set an eCPM value for the network. Once the eCPM can be calculated, the ad source automatically starts updating the eCPM on your behalf.

## Step 3: Import the LINE Ads Network SDK and Adapter

| **Note:** Failure to integrate the compatible LINE Ads Network and Google Mobile Ads SDK versions might lead to build issues.

### Android Studio integration (recommended)

In your app-level gradle file, add the following implementation
dependencies:  

### Kotlin

```kotlin
dependencies {
    implementation("com.google.android.gms:play-services-ads:24.9.0")
    implementation("com.google.ads.mediation:line:3.0.0.0")
}
```

### Groovy

```groovy
dependencies {
    implementation 'com.google.android.gms:play-services-ads:24.9.0'
    implementation 'com.google.ads.mediation:line:3.0.0.0'
}
```

### Manual integration

1. Download the latest version of the
   [LINE Ads Network
   SDK](https://mvnrepository.com/artifact/com.linecorp.adsnetwork/fivead)'s `.aar` file
   and add it to your project.

2. Navigate to the [LINE Ads Network adapter
   artifacts](https://maven.google.com/web/index.html#com.google.ads.mediation:line)
   on Google's Maven Repository. Select the latest version, download the LINE Ads
   Network adapter's `.aar` file, and add it to your project.

## Step 4: Add required code

No additional code is required for LINE Ads Network integration.

## Step 5: Test your implementation

### Enable test ads

Make sure you
[register your test device](https://developers.google.com/admob/android/test-ads#enable_test_devices)
for

AdMob.


The LINE Ads Network adapter contains a helper method to enable test mode for
LINE Ads Network. You must set this option before you
[initialize Google Mobile Ads SDK](https://developers.google.com/admob/android/quick-start#initialize_the_mobile_ads_sdk)
to ensure they get forwarded properly to the LINE Ads Network SDK.  

### Java

    LineMediationAdapter.Companion.setTestMode(true);  
    https://github.com/googleads/googleads-mobile-android-mediation/blob/0e5f5b9bbfc6e3b4b2a58837eae5dc261e5aecd4/Example/snippets/src/main/java/com/google/ads/mediation/snippets/java/LineMediationSnippets.java#L32-L32

### Kotlin

    LineMediationAdapter.setTestMode(true)  
    https://github.com/googleads/googleads-mobile-android-mediation/blob/0e5f5b9bbfc6e3b4b2a58837eae5dc261e5aecd4/Example/snippets/src/main/java/com/google/ads/mediation/snippets/kotlin/LineMediationSnippets.kt#L31-L31

| **Important:** Disable test mode for AdMob and LINE Ads Network before releasing your app.

### Verify test ads

To verify that you are receiving test ads from
LINE Ads Network,
enable
[single ad source testing](https://developers.google.com/admob/android/ad-inspector#single_ad_source_testing)
in ad inspector using the
**LINE Ads Network (Waterfall)** ad source(s).

## Optional steps

### Network-specific parameters

The LINE Ads Network adapter supports an additional request parameter which can
be passed to the adapter using the `LineExtras` class. This class constructor
includes the following parameters:

`enableAdSound`
:   A `boolean` to specify the default sound start state of banner,
    interstitial and rewarded ads.

Here's a code example of how to create an ad request that sets these parameters:  

### Java

    LineExtras lineExtras = new LineExtras(/* enableAdSound: */ true);
    Bundle extras = lineExtras.build();

    AdRequest request =
        new AdRequest.Builder().addNetworkExtrasBundle(LineMediationAdapter.class, extras).build();  
    https://github.com/googleads/googleads-mobile-android-mediation/blob/0e5f5b9bbfc6e3b4b2a58837eae5dc261e5aecd4/Example/snippets/src/main/java/com/google/ads/mediation/snippets/java/LineMediationSnippets.java#L38-L42

### Kotlin

    val lineExtras = LineExtras(enableAdSound = true)
    val extras = lineExtras.build()

    val request =
      AdRequest.Builder().addNetworkExtrasBundle(LineMediationAdapter::class.java, extras).build()  
    https://github.com/googleads/googleads-mobile-android-mediation/blob/0e5f5b9bbfc6e3b4b2a58837eae5dc261e5aecd4/Example/snippets/src/main/java/com/google/ads/mediation/snippets/kotlin/LineMediationSnippets.kt#L37-L41

### Using native ads

#### Ad rendering

The LINE Ads Network adapter populates the following

[Native ads advanced field descriptions](https://support.google.com/admob/answer/6240809)

for a

[`NativeAd`](https://developers.google.com/admob/android/reference/com/google/android/gms/ads/nativead/NativeAd).


| Field | Assets always included by LINE Ads Network adapter |
|---|---|
| Headline |   |
| Image |   |
| Body |   |
| App icon | ^[1](https://developers.google.com/admob/android/mediation/line#app-icon-footnote)^ |
| Call to action |   |
| Star rating |   |
| Store |   |
| Price |   |

^1^ For native ads, the LINE Ads
Network SDK does not provide an app icon asset. Instead, the LINE Ads Network
adapter populates the app icon with a transparent image.

## Error codes

If the adapter fails to receive an ad from LINE Ads Network, you can check the
underlying error from the ad response using


[`ResponseInfo.getAdapterResponses()`](https://developers.google.com/admob/android/reference/com/google/android/gms/ads/ResponseInfo#getAdapterResponses())

under the following classes:  

    com.line.ads
    com.google.ads.mediation.line.LineMediationAdapter

Here are the codes and accompanying messages thrown by the LINE Ads Network
adapter when an ad fails to load:

| Error code | Domain | Reason |
|---|---|---|
| 1-10 | com.five_corp.ad | LINE Ads Network SDK returned an SDK-specific error. See LINE Ads Network's [documentation](https://adsnetwork-docs.linebiz.com/fivesdk-android/trouble-shooting/quick-diagnosis.html) for more details. |
| 101 | com.google.ads.mediation.line | Missing or invalid Application ID. |
| 102 | com.google.ads.mediation.line | Missing or invalid Slot ID. |
| 103 | com.google.ads.mediation.line | The requested ad size does not match a LINE Ads Network supported banner ad size. |
| 104 | com.google.ads.mediation.line | Failed to load an interstitial or rewarded ad due to missing activity context. |
| 105 | com.google.ads.mediation.line | LINE Ads Network SDK failed to show an interstitial or rewarded ad. |
| 106 | com.google.ads.mediation.line | Failed to load a native ad due to missing assets. |

## LINE Android Mediation Adapter Changelog

#### Next Version

- Maps GMA SDK underage flags to Line SDK child treatment methods.

#### Version 3.0.0.0

- Verified compatibility with FiveAd SDK version 3.0.0.0.

Built and tested with:

- Google Mobile Ads SDK version 24.9.0.
- FiveAd SDK version 3.0.0.0.

#### Version 2.9.20251028.0

- Verified compatibility with FiveAd SDK version 2.9.20251028.

Built and tested with:

- Google Mobile Ads SDK version 24.7.0.
- FiveAd SDK version 2.9.20251028.0

#### Version 2.9.20250924.1

- Removed class-level references to Context. Can help reduce memory leak issues.

Built and tested with:

- Google Mobile Ads SDK version 24.7.0.
- FiveAd SDK version 2.9.20250924.1.

#### Version 2.9.20250924.0

- Verified compatibility with FiveAd SDK version 2.9.20250924.

Built and tested with:

- Google Mobile Ads SDK version 24.6.0.
- FiveAd SDK version 2.9.20250924.0

#### Version 2.9.20250718.0

- Verified compatibility with FiveAd SDK version 2.9.20250718.

Built and tested with:

- Google Mobile Ads SDK version 24.3.0.
- FiveAd SDK version 2.9.20250718.0.

#### Version 2.9.20250519.0

- Verified compatibility with FiveAd SDK version 2.9.20250519.

Built and tested with:

- Google Mobile Ads SDK version 24.3.0.
- FiveAd SDK version 2.9.20250519.0.

#### Version 2.9.20250317.1

- Fixes banner loading dimensions for bidding ads with new FiveAd API

Built and tested with:

- Google Mobile Ads SDK version 24.1.0.
- FiveAd SDK version 2.9.20250317.0

#### Version 2.9.20250317.0

- Verified compatibility with FiveAd SDK version 2.9.20250317.

Built and tested with:

- Google Mobile Ads SDK version 24.1.0.
- FiveAd SDK version 2.9.20250317.0

#### Version 2.9.20250110.1

- Updated the minimum required Android API level to 23.
- Updated the minimum required Google Mobile Ads SDK version to 24.0.0.

Built and tested with:

- Google Mobile Ads SDK version 24.0.0.
- FiveAd SDK version 2.9.20250110.0

#### Version 2.9.20250110.0

- Removed deprecated `UnifiedNativeAdMapper` class in favor of `NativeAdMapper`
- Fixed signals collection process.
- Fixed initialization process for waterfall interstitial and rewarded ad formats.
- Verified compatibility with FiveAd SDK version 2.9.20250110.

Built and tested with:

- Google Mobile Ads SDK version 23.6.0.
- FiveAd SDK version 2.9.20250110.0

#### Version 2.9.20241129.0

- Added bidding support for banner, interstitial, rewarded and native ad formats.
- Verified compatibility with FiveAd SDK version 2.9.20241129.

Built and tested with:

- Google Mobile Ads SDK version 23.5.0.
- FiveAd SDK version 2.9.20241129.0

#### Version 2.8.20240827.0

- Verified compatibility with FiveAd SDK version 2.8.20240827.

Built and tested with:

- Google Mobile Ads SDK version 23.3.0.
- FiveAd SDK version 2.8.20240827.0

#### Version 2.8.20240808.0

- Verified compatibility with FiveAd SDK version 2.8.20240808.

Built and tested with:

- Google Mobile Ads SDK version 23.2.0.
- FiveAd SDK version 2.8.20240808.0

#### Version 2.8.20240722.0

- Verified compatibility with FiveAd SDK version 2.8.20240722.

Built and tested with:

- Google Mobile Ads SDK version 23.2.0.
- FiveAd SDK version 2.8.20240722.0

#### Version 2.7.20240515.0

- Verified compatibility with FiveAd SDK version 2.7.20240515.

Built and tested with:

- Google Mobile Ads SDK version 23.1.0.
- FiveAd SDK version 2.7.20240515.0

#### Version 2.7.20240214.1

- Updated the minimum required Google Mobile Ads SDK version to 23.0.0.
- Verified compatibility with FiveAd SDK version 2.7.20240214.

Built and tested with:

- Google Mobile Ads SDK version 23.0.0.
- FiveAd SDK version 2.7.20240214.0.

#### Version 2.7.20240214.0

- Verified compatibility with FiveAd SDK version 2.7.20240214.

Built and tested with:

- Google Mobile Ads SDK version 22.6.0.
- FiveAd SDK version 2.7.20240214.0.

#### Version 2.7.20240126.0

- Verified compatibility with FiveAd SDK version 2.7.20240126.

Built and tested with:

- Google Mobile Ads SDK version 22.6.0.
- FiveAd SDK version 2.7.20240126.0.

#### Version 2.7.20240112.0

- Removed deprecated `FiveAdViewEventListener` in favor of `FiveAdCustomLayoutEventListener`, `FiveAdVideoRewardEventListener`, `FiveAdInterstitialEventListener` and `FiveAdNativeEventListener`.
- Verified compatibility with FiveAd SDK version 2.7.20240112.
- Updated the minimum required Google Mobile Ads SDK version to 22.6.0.

Built and tested with:

- Google Mobile Ads SDK version 22.6.0.
- FiveAd SDK version 2.7.20240112.

#### Version 2.6.20230607.1

- Added `LineExtras` class for publishers to define default sound settings for banner, interstitial and rewarded ad formats.
- Updated the minimum required Google Mobile Ads SDK version to 22.4.0.

Built and tested with:

- Google Mobile Ads SDK version 22.4.0.
- FiveAd SDK version 2.6.20230607.

#### Version 2.6.20230607.0

- Initial release.
- Adds support for banner, interstitial, rewarded and native ad formats.
- Verified compatibility with FiveAd SDK version 2.6.20230607.

Built and tested with:

- Google Mobile Ads SDK version 22.1.0.
- FiveAd SDK version 2.6.20230607.