เริ่มใช้งาน
โฆษณาเนทีฟคือชิ้นงานโฆษณาที่แสดงต่อผู้ใช้ด้วยคอมโพเนนต์ UI ของแพลตฟอร์มนั้นๆ ในแง่การเขียนโค้ด หมายความว่าเมื่อโฆษณาเนทีฟโหลด แอปของคุณจะได้รับออบเจ็กต์ NativeAd
ที่มีชิ้นงาน จากนั้นแอปของคุณจะเป็นผู้รับผิดชอบในการแสดงชิ้นงานดังกล่าว ไม่ใช่ Google Mobile Ads SDK
รูปแบบโฆษณานี้มีไว้สําหรับกรณีที่คุณต้องการควบคุมการจัดรูปแบบรูปลักษณ์ของโฆษณาได้มากขึ้น
หากไม่จําเป็นต้องใช้ฟีเจอร์เหล่านี้ ให้ใช้โฆษณารูปแบบอื่น
การแสดงโฆษณาเนทีฟในแอป Flutter ทําได้ 2 วิธีดังนี้
- เทมเพลตเนทีฟ: เทมเพลตเนทีฟที่กําหนดไว้ล่วงหน้าซึ่งจัดรูปแบบด้วย Dart API
- การตั้งค่าแพลตฟอร์ม: เลย์เอาต์เฉพาะแพลตฟอร์มที่กำหนดเองโดยใช้เครื่องมือเลย์เอาต์ Android และ iOS
เทมเพลตเนทีฟ
เทมเพลตมี 2 ประเภท ได้แก่ ขนาดเล็กหรือกลาง เทมเพลตแต่ละรายการมาพร้อมกับตัวเลือกการจัดสไตล์ UI แต่มีการปรับแต่งน้อยกว่าการติดตั้งใช้งานแพลตฟอร์ม
เล็ก |
 Android
|
 iOS
|
ปานกลาง |
 Android
|
 iOS
|
ดูรายละเอียดการใช้งานเทมเพลตเนทีฟใน Dart ได้ที่เทมเพลตเนทีฟ
การตั้งค่าแพลตฟอร์มเหมาะสําหรับกรณีที่คุณต้องการควบคุมรูปลักษณ์ของโฆษณาในแพลตฟอร์ม Android และ iOS อย่างเต็มรูปแบบ แต่คุณจะต้องเขียนโค้ดสําหรับทั้ง 2 แพลตฟอร์ม
ดูวิธีการตั้งค่าสำหรับแพลตฟอร์มที่เฉพาะเจาะจงได้ที่การตั้งค่าแพลตฟอร์ม
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-03-01 UTC
[null,null,["อัปเดตล่าสุด 2025-03-01 UTC"],[[["Native ads give you control over the ad's look and feel by providing ad assets that your app displays using native UI components."],["Choose between Native Templates for pre-defined layouts with styling options or Platform Setup for complete customization using Android/iOS tools."],["Native Templates offer small and medium sizes with some UI customization, while Platform Setup provides full control but requires platform-specific code."],["Refer to the provided links for detailed implementation instructions on both Native Templates and Platform Setup for Flutter."]]],["Native ads allow apps to display ad assets using native UI components. Apps receive a `NativeAd` object and handle asset display. There are two implementation methods: native templates and platform setup. Native templates offer pre-defined small or medium designs with some styling options. Platform setup provides full control over ad appearance on Android and iOS but requires platform-specific code. Native templates are detailed in the linked section and so are the platform specific set up.\n"]]