เปิดใช้เครื่องมือตรวจสอบโฆษณา
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ก่อนที่จะทดสอบการผสานรวมโฆษณา คุณต้องเปิดใช้เครื่องมือตรวจสอบโฆษณาในแอป
หน้านี้จะอธิบายวิธีเปิดใช้เครื่องมือตรวจสอบโฆษณา
โดยใช้ท่าทางสัมผัส
และวิธีเปิดใช้
แบบเป็นโปรแกรม
ข้อกำหนดเบื้องต้น
ก่อนดำเนินการต่อ ให้ทำดังนี้
- ทําตามรายการทั้งหมดในข้อกําหนดเบื้องต้นเริ่มต้นเพื่อสร้างบัญชี AdMob
ตั้งค่าอุปกรณ์ทดสอบ เริ่มต้น Google Mobile Ads SDK
และติดตั้งเวอร์ชันล่าสุด
เลือกตัวเลือกการเปิดตัว
คุณเปิดใช้เครื่องมือตรวจสอบโฆษณาได้ด้วยวิธีต่อไปนี้
- ใช้ท่าทางสัมผัสที่คุณเลือกใน UI ของ AdMob หลังจากลงทะเบียน
อุปกรณ์ทดสอบ โปรดดูรายละเอียดที่หัวข้อ
ตั้งค่าอุปกรณ์ทดสอบ
- โดยอัตโนมัติผ่าน
เมธอด
เปิดใช้โดยใช้ท่าทางสัมผัส
หากต้องการเปิดใช้เครื่องมือตรวจสอบโฆษณาด้วยท่าทางสัมผัส ให้ทำท่าทางสัมผัส เช่น สะบัดหรือเขย่า 2 ครั้ง ซึ่งคุณกำหนดค่าไว้ใน UI ของ AdMob สำหรับอุปกรณ์ทดสอบ ดูรายละเอียดเพิ่มเติมได้ที่
ทดสอบแอปด้วยเครื่องมือตรวจสอบโฆษณา
หลังจากตั้งค่าท่าทางสัมผัสใน UI ของ AdMob แล้ว ให้รอสักครู่เพื่อให้ระบบเผยแพร่การตั้งค่า ส่งคำขอโฆษณาผ่าน Google Mobile Ads SDK เพื่อลงทะเบียนการตั้งค่าท่าทางสัมผัสกับอุปกรณ์ทดสอบ หากการทำท่าทางสัมผัสไม่สามารถ
เปิดในเครื่องมือตรวจสอบโฆษณาได้ ให้ลองโหลดโฆษณา รีสตาร์ทแอป แล้วทดสอบท่าทางสัมผัส
อีกครั้ง
เปิดใช้งานแบบเป็นโปรแกรม
เปิดเครื่องมือตรวจสอบโฆษณาโดยเรียกใช้คำสั่งต่อไปนี้
public void OnButtonClick() {
MobileAds.OpenAdInspector((AdInspectorError error) =>
{
// Error will be set if there was an issue and the inspector was not displayed.
});
}
วิธีนี้ใช้ได้กับอุปกรณ์ทดสอบที่ลงทะเบียนโดยใช้โปรแกรมหรือใน AdMob UI
ดูรายละเอียดเพิ่มเติมได้ที่เปิดใช้อุปกรณ์ทดสอบ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-09-02 UTC
[null,null,["อัปเดตล่าสุด 2025-09-02 UTC"],[],[],null,["Select platform: [Android](/admob/android/ad-inspector/launch-ad-inspector \"View this page for the Android platform docs.\") [iOS](/admob/ios/ad-inspector/launch-ad-inspector \"View this page for the iOS platform docs.\") [Unity](/admob/unity/ad-inspector/launch-ad-inspector \"View this page for the Unity platform docs.\") [Flutter](/admob/flutter/ad-inspector/launch-ad-inspector \"View this page for the Flutter platform docs.\")\n\n\u003cbr /\u003e\n\nBefore you test your ad integration, you must launch ad inspector in your app.\nThis page covers how to launch ad inspector\nusing gestures\nand how to launch\nprogrammatically.\n\nPrerequisites\n\nBefore you continue, do the following:\n\n- Complete all items in the initial [Prerequisites](/admob/unity/ad-inspector#prerequisites) to create an AdMob account, set your test device, initialize Google Mobile Ads SDK, and install the latest version.\n\nChoose a launch option\n\nYou can launch ad inspector in the following ways:\n\n- Use the gesture you selected in the AdMob UI after registering a test device. For details, see [Set up a test device](https://support.google.com/admob/answer/9691433).\n- Programmatically through a method.\n\nLaunch using gestures\n\nTo launch ad inspector with a gesture, perform the gesture, such as a double\nflick or shake, that you configured in AdMob UI for your test\ndevice. For more details, see\n[Test your app with ad inspector](https://support.google.com/admob/answer/10159602).\n\nAfter you set a gesture in the AdMob UI, allow time to propagate. Make an ad\nrequest through the Google Mobile Ads SDK to register your\ngesture setting with your test device. If performing your gesture fails to\nopen in ad inspector, try to load an ad, restart your app, and test the gesture\nagain.\n\nLaunch programmatically\n\nLaunch ad inspector by running the following: \n\n public void OnButtonClick() {\n MobileAds.OpenAdInspector((AdInspectorError error) =\u003e\n {\n // Error will be set if there was an issue and the inspector was not displayed.\n });\n }\n\nThis method works for test devices registered\nprogrammatically or in the AdMob UI.\nFor more details, see\n[Enable test devices](/admob/unity/test-ads#enable_test_devices)."]]