ผสานรวม maio กับสื่อกลาง

This guide shows you how to use the Google Mobile Ads SDK 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 an Android 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. In this guide's descriptions and instructions however, labels and buttons are referenced with 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
Banner
Interstitial
Rewarded
Native

Requirements

  • Android API level 21 or higher
  • maio SDK 1.0.7 or higher

Step 1: Set up configurations in maio UI

ก่อนอื่น ให้ลงชื่อสมัครใช้หรือลงชื่อเข้าสู่ระบบบัญชี maio ของคุณ คลิกปุ่ม การจัดการแอปพลิเคชันในแถบด้านซ้าย แล้วคลิกแอปใหม่

เลือกแท็บประเภทโฆษณาที่ต้องการ

โฆษณาคั่นระหว่างหน้า

ป้อนชื่อของแอป เลือกแพลตฟอร์ม และระบุ URL ของแอป เลือกประเภทโฆษณาเป็นโฆษณาวิดีโอคั่นระหว่างหน้า แล้วคลิกอัปเดต

ได้รับรางวัลแล้ว

ป้อนชื่อของแอป เลือกแพลตฟอร์ม และระบุ URL ของแอป เลือกรางวัลวิดีโอเป็นประเภทโฆษณา แล้วคลิกอัปเดต

ในหน้าการจัดการแอปพลิเคชัน ให้จดรหัสสื่อ แต่คุณต้องตั้งค่า Ad Manager หน่วยโฆษณาในส่วนถัดไป

ในหน้า Zone Management ให้จดบันทึก Zone ID และยังเป็นสิ่งจำเป็นในการตั้งค่า Ad Manager หน่วยโฆษณาในส่วนถัดไปด้วย

นอกจากรหัสสื่อและรหัสโซนแล้ว คุณจะต้องใช้รหัส API และ API KEY เพื่อตั้งค่ารหัสหน่วยโฆษณาสำหรับสื่อกลางด้วย ในหน้า Reporting API ให้จดรหัส API และ API KEY

Step 2: Set up maio demand in Ad Manager UI

กำหนดการตั้งค่าสื่อกลางสำหรับหน่วยโฆษณา

ลงชื่อเข้าใช้บัญชี Ad Manager

ไปที่การแสดงโฆษณา > กลุ่มผลตอบแทน แล้วคลิกปุ่มกลุ่มผลตอบแทนใหม่

ป้อนชื่อที่ไม่ซ้ำสำหรับกลุ่มผลตอบแทน ตั้งค่าสถานะเป็นใช้งานอยู่ เลือกรูปแบบโฆษณา และตั้งค่าประเภทพื้นที่โฆษณาเป็นแอปบนอุปกรณ์เคลื่อนที่ ในส่วนการกำหนดเป้าหมาย > พื้นที่โฆษณา ให้เลือกหน่วยโฆษณาภายใต้พื้นที่โฆษณาและแอปพลิเคชันบนอุปกรณ์เคลื่อนที่ที่คุณต้องการเพิ่มสื่อกลาง

จากนั้น คลิกปุ่มเพิ่มพาร์ทเนอร์ผลตอบแทน

หากมีพาร์ทเนอร์ผลตอบแทนสำหรับmaioอยู่แล้ว คุณก็เลือกได้ มิเช่นนั้น ให้เลือกสร้างพาร์ทเนอร์ผลตอบแทนใหม่

เลือก maio เป็นเครือข่ายโฆษณา ป้อนชื่อที่ไม่ซ้ำ และเปิดใช้สื่อกลาง

เปิดการรวบรวมข้อมูลอัตโนมัติ แล้วป้อนAPI ID and API KEY ที่ได้รับในส่วนก่อนหน้า

เมื่อเลือกพาร์ทเนอร์ผลตอบแทนแล้ว ให้เลือกสื่อกลาง SDK บนอุปกรณ์เคลื่อนที่เป็นประเภทการผสานรวม Android เป็นแพลตฟอร์ม และเลือกใช้งานอยู่เป็นสถานะ ป้อนMedia ID and Zone ID ที่ได้รับในส่วนก่อนหน้านี้ จากนั้นป้อนค่า CPM เริ่มต้น

คลิกบันทึกที่ด้านล่างของหน้าเมื่อทำเสร็จแล้ว

Step 3: Import the maio SDK and adapter

In your project-level settings.gradle.kts file, add the following repositories:

dependencyResolutionManagement {
  repositories {
    google()
    mavenCentral()
    maven {
      url = uri("https://imobile-maio.github.io/maven")
    }
  }
}

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

dependencies {
    implementation("com.google.android.gms:play-services-ads:23.3.0")
    implementation("com.google.ads.mediation:maio:1.1.16.3")
}

Manual integration

  • Download the latest version of maio Android SDK and add it to your project.
  • Navigate to the maio adapter artifacts on Google's Maven Repository. Select the latest version, download the maio adapter's `.aar' file, and add it to your project.

Step 4: Add required code

No additional code is required for maio Android integration.

Step 5: Test your implementation

เปิดใช้โฆษณาทดสอบ

อย่าลืม ลงทะเบียนอุปกรณ์ทดสอบ สำหรับ Ad Manager

ผู้เผยแพร่โฆษณาที่ใช้ Google Mobile Ads SDK เวอร์ชัน 11.6.0 ขึ้นไปจะได้รับโฆษณาทดสอบจาก maio โดยอัตโนมัติในโทรศัพท์และแท็บเล็ตที่ลงทะเบียนเป็นอุปกรณ์ทดสอบเมื่อส่งคำขอ

ยืนยันโฆษณาทดสอบ

ในการยืนยันว่าคุณได้รับโฆษณาทดสอบจาก maio ให้เปิดใช้ การทดสอบแหล่งที่มาของโฆษณาแหล่งเดียว ในเครื่องมือตรวจสอบโฆษณาโดยใช้ maio (Waterfall) แหล่งที่มาของโฆษณา

Error codes

If the adapter fails to receive an ad from maio, publishers can check the underlying error from the ad response using ResponseInfo.getAdapterResponses() under the following classes:

Format Class name
Interstitial jp.maio.sdk.android.mediation.admob.adapter.Interstitial
Rewarded jp.maio.sdk.android.mediation.admob.adapter.Rewarded

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

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.

maio Android Mediation Adapter Changelog

Version 1.1.16.3

  • Updated the minimum required Google Mobile Ads SDK version to 23.0.0.
  • Verified compatibility with maio SDK version 1.1.16.

Built and tested with:

  • Google Mobile Ads SDK version 23.0.0.
  • Maio SDK version 1.1.16.

Version 1.1.16.2

  • Updated adapter to use new VersionInfo class.
  • Updated the minimum required Google Mobile Ads SDK version to 22.0.0.

Built and tested with:

  • Google Mobile Ads SDK version 22.0.0.
  • Maio SDK version 1.1.16.

Version 1.1.16.1

  • Updated compileSdkVersion and targetSdkVersion to API 31.
  • Updated the minimum required Google Mobile Ads SDK version to 21.0.0.
  • Updated the minimum required Android API level to 19.

Built and tested with:

  • Google Mobile Ads SDK version 21.0.0.
  • Maio SDK version 1.1.16.

Version 1.1.16.0

  • Updated error codes to capture additional maio errors.
  • Verified compatibility with maio SDK version 1.1.16.
  • Updated the minimum required Google Mobile Ads SDK version to 20.4.0.

Built and tested with:

  • Google Mobile Ads SDK version 20.4.0.
  • Maio SDK version 1.1.16.

Version 1.1.15.0

  • Verified compatibility with maio SDK version 1.1.15.
  • Updated the minimum required Google Mobile Ads SDK version to 20.0.0.

Built and tested with:

  • Google Mobile Ads SDK version 20.0.0.
  • Maio SDK version 1.1.15.

Version 1.1.14.0

  • Added standardized adapter error codes and messages.
  • Verified compatibility with maio SDK version 1.1.14.
  • Updated the minimum required Google Mobile Ads SDK version to 19.8.0.

Built and tested with:

  • Google Mobile Ads SDK version 19.8.0.
  • Maio SDK version 1.1.14.

Version 1.1.13.0

  • Verified compatibility with maio SDK version 1.1.13.
  • Updated the minimum required Google Mobile Ads SDK version to 19.5.0.

Built and tested with:

  • Google Mobile Ads SDK version 19.5.0.
  • Maio SDK version 1.1.13.

Version 1.1.12.0

  • Updated the minimum required Google Mobile Ads SDK version to 19.4.0.

Built and tested with:

  • Google Mobile Ads SDK version 19.4.0.
  • Maio SDK version 1.1.12.

Version 1.1.11.1

  • To limit timouts, ad requests will now immediately fail if maio does not have an ad ready to be shown.
  • Updated the minimum required Google Mobile Ads SDK version to 19.1.0.

Built and tested with:

  • Google Mobile Ads SDK version 19.1.0.
  • Maio SDK version 1.1.11.

Version 1.1.11.0

  • Verified compatibility with maio SDK version 1.1.11.
  • Updated the minimum required Google Mobile Ads SDK version to 18.3.0.

Built and tested with:

  • Google Mobile Ads SDK version 18.3.0.
  • Maio SDK version 1.1.11.

Version 1.1.10.0

  • Verified compatibility with maio SDK version 1.1.10.
  • Updated the minimum required Google Mobile Ads SDK version to 18.2.0.

Version 1.1.8.0

  • Verified compatibility with maio SDK version 1.1.8.
  • Updated the minimum required Google Mobile Ads SDK version to 18.1.0.

Version 1.1.7.0

  • Bug Fixes.
  • Verified compatibility with maio SDK version 1.1.7.

Version 1.1.6.1

  • Updated adapter to support new Rewarded API.
  • Updated the minimum required Google Mobile Ads SDK version to 17.2.0.

Version 1.1.6.0

  • Verified compatibility with maio SDK version 1.1.6.

Version 1.1.5.0

  • Verified compatibility with maio SDK version 1.1.5.

Version 1.1.4.0

  • Verified compatibility with maio SDK version 1.1.4.

Version 1.1.3.1

  • Updated the adapter to work with instance class instead of singleton.

Version 1.1.3.0

  • Verified compatibility with maio SDK version 1.1.3.

Version 1.1.2.1

  • Updated the adapter with updated initialize functions.

Version 1.1.2.0

  • Verified compatibility with maio SDK version 1.1.2.

Version 1.1.1.1

  • Updated the adapter to invoke the onRewardedVideoComplete() ad event.

Version 1.1.1.0

  • Verified compatibility with maio SDK version 1.1.1.

Version 1.1.0.0

  • Verified compatibility with maio SDK version 1.1.0.

Version 1.0.8.0

  • Verified compatibility with maio SDK version 1.0.8.

Version 1.0.7.1

  • Fixed an issue that could cause NullPointerExceptions to occur when ads fail to load.

Version 1.0.7.0

  • Added ability to enable test mode by adding test device id to AdRequest.
  • Verified compatibility with maio SDK version 1.0.7.

Version 1.0.6.0

  • First release!
  • Added support for interstitials and rewarded video ads.