This guide shows you how to use the Google Mobile Ads SDK to load and display ads from LINE Ads Network using 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 a Flutter app.
Supported integrations and ad formats
The AdMob mediation adapter for LINE Ads Network has the following capabilities:
Integration | |
---|---|
Bidding | 1 |
Waterfall | |
Formats | |
Banner | |
Interstitial | |
Rewarded | |
Native |
1 Bidding integration is in closed beta, reach out to your account manager to request access.
Requirements
- Latest Google Mobile Ads SDK
- Flutter 3.7.0 or higher
- To deploy on Android
- Android API level 21 or higher
- To deploy on iOS
- iOS deployment target of 12.0 or higher
- A working Flutter project configured with Google Mobile Ads SDK. See Get Started for details.
- Complete the mediation Get started guide
Step 1: Set up configurations in LINE Ads Network UI
Log in to your LINE Ads Network account.
Add a new application
Click 広告枠管理 (Ad Slot Management) > メディア (Media). Then, click 新規作成 (Create New).
Fill out the form and click 登録 (Register).
Take note of the Application ID.
Create an ad placement
Click the ID of the application you want to add an ad placement. Then, select 詳細 (Detail).
Click スロット 追加 (Add Slot).
Fill out the form and once done, click (登録) Register.
Take note of the Slot ID.
Step 2: Set up LINE Ads Network demand in AdMob UI
Configure mediation settings for your ad unit
For instructions, see step 2 in the guide for Android.
For instructions, see step 2 in the guide for iOS.
Step 3: Import the LINE Ads Network SDK and adapter
Integration through pub.dev
Add the following dependency with the latest versions of the
LINE Ads Network SDK and adapter in your
package's pubspec.yaml
file:
dependencies:
gma_mediation_line: ^
Manual Integration
Download the latest version of Google Mobile Ads mediation plugin for
LINE Ads Network,
extract the downloaded file, and add the extracted plugin folder
(and its contents) to your Flutter project. Then, reference the plugin in your
pubspec.yaml
file by adding the following dependency:
dependencies:
gma_mediation_line:
path: path/to/local/package
Step 4: Add required code
No additional code is required for LINE Ads Network integration.
SKAdNetwork integration
Follow LINE Ads Network's documentation
to add the SKAdNetwork identifiers to your project's Info.plist
file.
Step 5: Test your implementation
Enable test ads
Make sure you register your test device for AdMob.
Verify test ads
To verify that you are receiving test ads from LINE Ads Network, enable 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 Flutter mediation plugin supports the following
additional request parameter which can be passed to the adapter through the
LineMediationExtras
class:
-
enableAdSound
: Specifies 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:
LineMediationExtras lineExtras = LineMediationExtras(enableAdSound: true)
AdRequest request = AdRequest(
keywords: <String>['foo', 'bar'],
contentUrl: 'http://foo.com/bar.html',
mediationExtras: [lineExtras],
);
Error codes
If the adapter fails to receive an ad from LINE Ads Network,
publishers can check the underlying error from the ad response using
ResponseInfo
under the following classes:
com.line.ads
com.google.ads.mediation.line.LineMediationAdapter
GADMediationAdapterLine
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 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. |
Error code | Domain | Reason |
---|---|---|
1-10 | Sent by LINE Ads Network SDK | LINE Ads Network SDK returned an SDK-specific error. See LINE Ads Network's documentation for more details. |
101 | com.google.ads.mediation.line | Invalid server parameters (e.g. Missing Application ID or Slot ID). |
102 | com.google.ads.mediation.line | The requested ad size does not match a LINE Ads Network supported banner ad size. |
103 | com.google.ads.mediation.line | Failed to load an information icon image asset in native ad. |
Line Flutter Mediation Adapter Changelog
1.0.0
- Initial release.
- Supports Line Android adapter version 2.9.20250110.0.
- Supports Line iOS adapter version 2.9.20241106.1.
- Built and tested with the Google Mobile Ads Flutter Plugin version 5.3.1.