ตรวจสอบข้อกำหนดเวอร์ชัน Android
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
รหัสโฆษณา
หากแอปใช้ IMA SDK เวอร์ชัน 3.25.1 ขึ้นไป SDK จะประกาศสิทธิ์ com.google.android.gms.permission.AD_ID โดยอัตโนมัติอยู่แล้วและสามารถเข้าถึงรหัสโฆษณาได้ทุกเมื่อที่พร้อมใช้งาน
สำหรับแอปที่ใช้ IMA SDK เวอร์ชัน 3.24.0 หรือต่ำกว่าและกำหนดเป้าหมายเป็น Android
13 คุณต้องเพิ่มสิทธิ์com.google.android.gms.permission.AD_IDใน
AndroidManifest.xml สำหรับ SDK โฆษณาในอุปกรณ์เคลื่อนที่ของ Google เพื่อเข้าถึง
รหัสโฆษณา:
<manifest>
<application>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
...
</application>
<!-- For apps targeting Android 13 or higher & IMA SDK version 3.24.0 or lower -->
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
</manifest>
หากต้องการดูข้อมูลเพิ่มเติมเกี่ยวกับสิทธิ์ com.google.android.gms.permission.AD_ID
การประกาศ รวมถึงวิธีปิดใช้งาน โปรดดูที่
คอนโซล Play
รหัสชุดแอป
ในอุปกรณ์ Android 12 เป็นต้นไป Google Play จะไม่ใช้รหัสโฆษณา
เมื่อผู้ใช้เลือกไม่ใช้การปรับเปลี่ยนในแบบของคุณในการตั้งค่า Android Google Play
ยังได้เปิดตัวรหัสชุดแอป
ซึ่งให้วิธีเชื่อมโยงการใช้งานหรือการดำเนินการในชุดต่างๆ ที่เคารพความเป็นส่วนตัว
ของแอปที่เป็นขององค์กรเดียวกัน
IMA เวอร์ชัน 3.25.1 ขึ้นไปจะมี SDK รหัสชุดแอปโดยค่าเริ่มต้น รหัสชุดแอป
เป็นสิ่งจำเป็นในการรองรับกรณีการใช้งานที่ไม่ใช่โฆษณา เช่น ข้อมูลวิเคราะห์และการประพฤติมิชอบ
เมื่อรหัสโฆษณาลดลงเป็นศูนย์ ดูข้อมูลเพิ่มเติมเกี่ยวกับ
รหัสชุดแอปโปรดดูข้อมูลนี้
คู่มือนักพัฒนาซอฟต์แวร์ Android
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-01 UTC
[null,null,["อัปเดตล่าสุด 2025-08-01 UTC"],[[["\u003cp\u003eFor apps using IMA SDK version 3.25.1 or higher, the Advertising ID permission is automatically declared and accessible when available.\u003c/p\u003e\n"],["\u003cp\u003eApps using IMA SDK version 3.24.0 or lower and targeting Android 13 must manually add the \u003ccode\u003ecom.google.android.gms.permission.AD_ID\u003c/code\u003e permission to their \u003ccode\u003eAndroidManifest.xml\u003c/code\u003e file to access the Advertising ID.\u003c/p\u003e\n"],["\u003cp\u003eOn Android 12 and later, the advertising ID is zeroed out when users opt out of personalization, and the App Set ID provides a privacy-focused alternative for correlating usage across apps from the same organization.\u003c/p\u003e\n"],["\u003cp\u003eIMA SDK version 3.25.1 and higher includes the App Set ID SDK by default to support analytics and fraud prevention when the advertising ID is unavailable.\u003c/p\u003e\n"]]],[],null,["# Review Android version requirements\n\nAdvertising ID\n--------------\n\nIf your app uses the IMA SDK version 3.25.1 or higher, the SDK already\nautomatically declares the `com.google.android.gms.permission.AD_ID` permission\nand is able to access the Advertising ID whenever it's available.\n\nFor apps that use the IMA SDK version 3.24.0 or lower and are targeting Android\n13, you must add the `com.google.android.gms.permission.AD_ID` permission in the\n`AndroidManifest.xml` file for the Google Mobile Ads SDK to access the\nAdvertising ID: \n\n \u003cmanifest\u003e\n \u003capplication\u003e\n \u003cmeta-data\n android:name=\"com.google.android.gms.ads.APPLICATION_ID\"\n android:value=\"ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy\"/\u003e\n\n ...\n\n \u003c/application\u003e\n \u003c!-- For apps targeting Android 13 or higher & IMA SDK version 3.24.0 or lower --\u003e\n \u003cuses-permission android:name=\"com.google.android.gms.permission.AD_ID\"/\u003e\n \u003c/manifest\u003e\n\nTo learn more about the `com.google.android.gms.permission.AD_ID` permission\ndeclaration, including how to disable it, please refer to this\n[Play Console](//support.google.com/googleplay/android-developer/answer/6048248)\narticle.\n\nApp Set ID\n----------\n\nStarting with Android 12 devices, Google Play will zero out the advertising ID\nwhen a user opts out of personalization in their Android Settings. Google Play\nhas also introduced the [App Set ID](//developer.android.com/training/articles/app-set-id),\nwhich offers a privacy-friendly way to correlate usage or actions across a set\nof apps owned by the same organization.\n\nIMA version 3.25.1 or higher includes the App Set ID SDK by default. App Set ID\nis essential to support non ads use-cases such as analytics and fraud\nprevention, when the advertising ID is zeroed out. For more information on the\nApp Set ID see this\n[Android developer guide](//developer.android.com/training/articles/app-set-id#scope)."]]