미디에이션과 라인 통합 (베타)

This guide shows you how to use the Google Mobile Ads SDK to load and display ads from Line using AdMob Mediation, covering waterfall integrations. It covers how to add Line to an ad unit's mediation configuration, and how to integrate the Line SDK and adapter into an Android app.

The dashboard interface for Line 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 has the following capabilities:

Integration
Bidding
Waterfall  1
Formats
Banner
Interstitial
Rewarded
Native

1 Waterfall integration is in open beta.

Requirements

  • Android API level 21 or higher

Step 1: Set up configurations in Line UI

Line 계정에 로그인합니다.

새 애플리케이션 추가

広告枠管\\(광고 슬롯 관리) > 감지되었습니다.ア (미디어)를 클릭합니다. 그런 다음 新規設 (새로 만들기)를 클릭합니다.

양식을 작성한 후 設="#(등록)을 클릭하세요.

애플리케이션 ID를 기록해 둡니다.

광고 게재위치 만들기

광고 게재위치를 추가할 애플리케이션의 ID를 클릭합니다. 그런 다음 詳細 (Detail)를 선택합니다.

・ロット 追GAD (슬롯 추가)를 클릭합니다.

양식을 작성한 후 (設設) Register를 클릭합니다.

슬롯 ID를 기록해 둡니다.

Step 2: Set up Line demand in AdMob UI

광고 단위에 대한 미디에이션 설정 구성

Line 를 광고 단위의 미디에이션 구성에 추가해야 합니다.

먼저 AdMob 계정에 로그인합니다. 그런 다음 미디에이션 탭으로 이동합니다. 수정할 기존 미디에이션 그룹이 있는 경우 해당 미디에이션 그룹의 이름을 클릭하여 수정한 후 Line 광고 소스로 추가로 건너뜁니다.

새 미디에이션 그룹을 만들려면 미디에이션 그룹 만들기를 선택합니다.

광고 형식과 플랫폼을 입력하고 계속을 클릭합니다.

미디에이션 그룹에 이름을 지정하고 타겟팅할 위치를 선택합니다. 미디에이션 그룹 상태를 사용으로 설정한 다음 광고 단위 추가를 클릭합니다.

이 미디에이션 그룹을 하나 이상의 기존AdMob 광고 단위와 연결합니다. 그런 다음 완료를 클릭합니다.

이제 광고 단위 카드가 선택한 광고 단위로 채워진 것을 볼 수 있습니다.

광고 소스로 Line 추가

광고 소스 섹션의 폭포식 구조 카드에서 광고 소스 추가를 선택합니다. 그런 다음 Line을 선택합니다.

Line를 선택합니다. 그런 다음Line 에 eCPM 값을 입력하고 계속을 클릭합니다.

이미 Line에 대한 매핑이 있는 경우 해당 매핑을 선택할 수 있습니다. 그렇지 않으면 매핑 추가를 클릭합니다.

그런 다음 이전 섹션에서 얻은 Application ID and Slot ID를 입력합니다. 그런 다음 완료를 클릭합니다.

Step 3: Import the Line SDK and Adapter

In your app-level build.gradle.kts file, add the following implementation dependencies and configurations. Use the latest versions of the Line SDK and adapter:

dependencies {
    implementation("com.google.android.gms:play-services-ads:23.2.0")
    implementation("com.google.ads.mediation:line:2.7.20240515.0")
}

Manual integration

  1. Download the latest version of the Line SDK's .aar file and add it to your project.

  2. Navigate to the Line adapter artifacts on Google's Maven Repository. Select the latest version, download the Line adapter's .aar file, and add it to your project.

Step 4: Add required code

No additional code is required for Line integration.

Step 5: Test your implementation

테스트 광고 사용 설정

AdMob

라인 테스트 광고를 사용 설정하는 방법은 Line 문서 의 안내를 따르세요.

테스트 광고 확인

Line에서 테스트 광고를 수신하고 있는지 확인하려면 광고 검사기에서 Line (Waterfall) 광고 소스를 사용하여 단일 광고 소스 테스트를 사용 설정하세요.

Optional steps

Network-specific parameters

The Line 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(true);
Bundle extras = lineExtras.build();

AdRequest request = new AdRequest.Builder()
   .addNetworkExtrasBundle(LineMediationAdapter.class, extras)
   .build();

Kotlin

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

val request = AdRequest.Builder()
   .addNetworkExtrasBundle(LineMediationAdapter::class.java, extras)
   .build()

Using native ads

Ad rendering

The Line adapter populates the following Native ads advanced field descriptions for a NativeAd.

Field Assets always included by Line adapter
Headline
Image
Body
App icon 1
Call to action
Star rating
Store
Price

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

Error codes

If the adapter fails to receive an ad from Line, you can check the underlying error from the ad response using 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 adapter when an ad fails to load:

Error code Domain Reason
1-10 com.five_corp.ad Line SDK returned an SDK-specific error. See Line's documentation 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 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 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

Version 2.7.20240515.0

  • Updated the minimum required Google Mobile Ads SDK version to 23.1.0.
  • Verified compatibility with FiveAd SDK version 2.7.20240515.0

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.0.

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.0.

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.0.

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.