หากแอปใช้ 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
ยังได้เปิดตัวรหัสชุดแอป
ซึ่งให้วิธีเชื่อมโยงการใช้งานหรือการดำเนินการในชุดต่างๆ ที่เคารพความเป็นส่วนตัว
ของแอปที่เป็นขององค์กรเดียวกัน
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-03-20 UTC"],[[["IMA SDK versions 3.25.1 and higher automatically declare the `com.google.android.gms.permission.AD_ID` permission, granting access to the Advertising ID when available."],["For apps using IMA SDK versions 3.24.0 or lower and targeting Android 13, you must manually add the `com.google.android.gms.permission.AD_ID` permission to your `AndroidManifest.xml` file to enable Google Mobile Ads SDK to access the Advertising ID."],["On Android 12 and later, Google Play zeroes out the Advertising ID when users opt out of personalization, introducing the App Set ID as a privacy-focused alternative for correlating app usage within the same organization."],["IMA SDK version 3.25.1 and higher includes the App Set ID SDK by default, supporting non-ads use cases like analytics and fraud prevention when the Advertising ID is unavailable."]]],["Apps using IMA SDK 3.25.1+ automatically declare and access the Advertising ID. Apps with IMA SDK 3.24.0 or lower, targeting Android 13, must add the `com.google.android.gms.permission.AD_ID` permission to their `AndroidManifest.xml`. Android 12+ devices will zero out the advertising ID if the user disables personalization. The App Set ID, included by default in IMA 3.25.1+, allows usage correlation across apps from the same organization when the advertising ID is zeroed.\n"]]