This guide shows you how to use Google Mobile Ads SDK for React Native to load and display ads from maio using mediation, covering waterfall integrations. It covers how to add maio to an ad unit's mediation configuration, and how to integrate the maio SDK and adapter into a React Native app.
The dashboard interface for maio uses Japanese text for its labels, buttons, and descriptions, and the screenshots in this guide have not been translated. However, in descriptions and instructions here, labels and buttons are referred to by their English language equivalents. "URL スキーム," for example, is "URL Scheme,".
Supported integrations and ad formats
The mediation adapter for maio has the following capabilities:
| Integration | |
|---|---|
| Bidding | |
| Waterfall | |
| Formats | |
| App Open | |
| Banner | |
| Interstitial | |
| Rewarded | |
| Rewarded Interstitial | |
| Native | |
Prerequisites
Before you continue, verify the following:
- Latest Google Mobile Ads SDK for React Native version.
- React Native framework version 0.85.0 or later.
- To deploy on Android
- Android API level 24 or later.
- To deploy on iOS
- iOS deployment target of 15.0 or later.
- A working React Native project configured with Google Mobile Ads SDK for React Native.
See Set up Google Mobile Ads SDK for React Native for details.
- Make sure you have downloaded and extracted the
adaptersfolder from thegma-sdk-react-nativefolder. If you don't have theadaptersfolder, follow steps one, two, and three in Install Google Mobile Ads SDK for React Native.
- Make sure you have downloaded and extracted the
- Set up AdMob Mediation.
Step 1: Set up configurations in maio UI
First, sign up or log in to your maio account. Click the Application management button on the left sidebar and click on New app.

Select the tab corresponding to your preferred Ad Type.
Interstitial
Enter the Name of your app, select the platform and provide your App URL. Select Video interstitial as the Ad Type, and then click Update.
Android

iOS

Rewarded
Enter the Name of your app, select the platform and provide your App URL. Select Video Rewards as the Ad Type, and then click Update.
Android

iOS

In the Application Management page, make a note of the Media ID. It's needed to set up your AdMob ad unit in the next section.
Android

iOS

In the Zone Management page, make a note of the Zone ID. It will also be needed to set up your AdMob ad unit in the next section.
Android

iOS


Step 2: Set up maio demand in AdMob UI
Configure mediation settings for your ad unit
Android
For instructions, see step 2 in the guide for Android.
iOS
For instructions, see step 2 in the guide for iOS.
Step 3: Import the maio SDK and adapter
In your project's root directory, install the Google Mobile Ads SDK for React Native mediation adapter for maio. Complete the following:
Copy the Google Mobile Ads SDK for React Native adapter tar file from the
gma-sdk-react-native/adapters/maio/directory into your project'slocal_packages/directory. If you don't have theadaptersfolder, see Prerequisites.mkdir -p local_packages cp EXTRACT_DIR/gma-sdk-react-native/adapters/maio/gma-mediation-maio-0.1.0.tgz local_packages/Replace EXTRACT_DIR with the path to the directory where you extracted the archive.
Install the adapter package using your preferred package manager:
npm
npm install ./local_packages/gma-mediation-maio-0.1.0.tgzyarn
yarn add ./local_packages/gma-mediation-maio-0.1.0.tgzIf you're building for Android, add the following repository to the
build.gradlefile in your project'sandroiddirectory:repositories { google() mavenCentral() maven { url = uri("https://imobile-maio.github.io/maven") } }
Step 4: Add required code
Android
No additional code is required for maio integration.
iOS
SKAdNetwork integration
Follow maio'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.
Publishers using version 7.26.0 or higher of Google Mobile Ads SDK for React Native will automatically receive test ads from maio on phones and tablets registered as test devices when making requests.
Verify test ads
To verify that you are receiving test ads from maio, enable single ad source testing in ad inspector using the maio (Waterfall) ad source(s).
Error codes
If the adapter fails to receive an ad from maio, publishers can check the
underlying error from the ad response using
ResponseInfo under the
following classes:
Android
| Format | Class name |
|---|---|
| Interstitial | jp.maio.sdk.android.mediation.admob.adapter.Interstitial |
| Rewarded | jp.maio.sdk.android.mediation.admob.adapter.Rewarded |
iOS
| Format | Class name |
|---|---|
| Interstitial | GADMMaioInterstitialAdapter |
| Rewarded | GADMMaioRewardedAdapter |
Here are the codes and accompanying messages thrown by the maio adapter when an ad fails to load:
Android
| Error code | Reason |
|---|---|
| 0-10 | maio returned an SDK-specific error. See code and maio's documentation for more details. |
| 101 | Maio does not have an ad available. |
| 102 | Invalid server parameters (e.g. missing Placement ID). |
| 103 | Context used to load an ad was not an `Activity` instance. |
iOS
| Error code | Reason |
|---|---|
| 0-10 | maio returned an SDK-specific error. See maio's code for more details. |
| 101 | maio doesn't yet have an ad available. |
| 102 | Invalid server parameters (e.g. missing Placement ID). |
| 103 | The maio adapter does not support the ad format being requested. |
| 104 | An ad is already loaded for this network configuration. |
Version 0.1.0
- Initial release.
- Supports maio Android adapter version 2.0.9.1.
- Supports maio iOS adapter version 2.2.1.2.1.