การปกป้องความสมบูรณ์สำหรับ Google Play Games บน PC
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Google Play Games บน PC รองรับการปกป้องความสมบูรณ์ผ่าน Play Integrity API และฟีเจอร์อื่นๆ ของ Google Play อีกหลายรายการ เพื่อช่วยตรวจสอบว่าเกมของคุณไม่มีการดัดแปลงหรือติดตั้งจากแหล่งที่มาที่ไม่น่าเชื่อถือ
Play Integrity API
Play Integrity API ช่วยปกป้องเกมของคุณจากการโต้ตอบที่อาจมีความเสี่ยงและเป็นการฉ้อโกง API นี้จะช่วยให้คุณลดการโจมตีและการละเมิด เช่น การฉ้อโกง กลโกง และการเข้าถึงโดยไม่ได้รับอนุญาต Play Integrity API จะมาแทนที่ SafetyNet Attestation API (SNAA) และ Play App Licencing API
SNAA ใช้งานร่วมกับ Google Play Games บน PC ไม่ได้
ช่องความสมบูรณ์ของอุปกรณ์
ช่อง deviceRecognitionVerdict
มีค่าเดียวคือ deviceRecognitionVerdict
ซึ่งแสดงถึงความสามารถของอุปกรณ์ในการบังคับใช้ความสมบูรณ์ของแอป โดยค่าเริ่มต้น
deviceRecognitionVerdict
อาจมีค่าใดค่าหนึ่งต่อไปนี้
MEETS_DEVICE_INTEGRITY
: แอปทำงานบนอุปกรณ์ที่ขับเคลื่อนโดย Android ซึ่งมีบริการ Google Play อุปกรณ์ผ่านการตรวจสอบความสมบูรณ์ของระบบและเป็นไปตามข้อกําหนดความเข้ากันได้ของ Android
MEETS_VIRTUAL_INTEGRITY
: แอปทำงานในสภาพแวดล้อม Android เสมือนจริงที่มีบริการ Google Play ซึ่งปัจจุบันจำกัดไว้สำหรับ Google Play Games บน PC สภาพแวดล้อมเป็นไปตามข้อกำหนดหลักด้านความเข้ากันได้ของ Android และผ่านการตรวจสอบความสมบูรณ์ของ Google Play
- ไม่มี (ค่าว่าง): แอปกำลังทำงานในอุปกรณ์ที่มีสัญญาณการโจมตี (เช่น การฮุก API) หรือการบุกรุกระบบ (เช่น การรูท) หรือแอปกำลังทำงานในอุปกรณ์ที่ไม่ใช่อุปกรณ์จริง (เช่น โปรแกรมจำลอง) ที่ไม่ผ่านการตรวจสอบความน่าเชื่อถือของ Google Play
Play Integrity API ใช้ค่า deviceRecognitionVerdict
MEETS_VIRTUAL_INTEGRITY
เพื่อระบุว่าเกมกำลังทำงานใน Google Play Games บน PC ต่อไปนี้คือตัวอย่างการตอบกลับที่ผ่านจาก Play Integrity API
deviceIntegrity: {
// "MEETS_VIRTUAL_INTEGRITY" indicates the game is running on Google Play Games on PC
deviceRecognitionVerdict: ["MEETS_VIRTUAL_INTEGRITY"]
}
หากคุณมีเกมข้ามแพลตฟอร์มที่พร้อมให้บริการทั้งบนอุปกรณ์เคลื่อนที่และ Google Play Games บน PC โปรดตรวจสอบว่าตรรกะการตรวจสอบของคุณตรวจสอบทั้ง MEETS_VIRTUAL_INTEGRITY
และ MEETS_DEVICE_INTEGRITY
การปกป้องโดยอัตโนมัติ
การปกป้องอัตโนมัติของ Google Play เป็นบริการที่ช่วยคุณปกป้องเกมจากการจัดจำหน่ายซ้ำและการละเมิดลิขสิทธิ์ที่ไม่ได้รับอนุญาต เมื่อผู้ใช้ดาวน์โหลดแอปที่ได้รับการปกป้องของคุณจากช่องทางการจัดจำหน่ายที่ไม่รู้จัก ระบบจะแจ้งให้ผู้ใช้ดาวน์โหลดแอปอย่างเป็นทางการจาก Google Play การปกป้องอัตโนมัติทำงานในแอปของคุณได้โดยไม่ต้องใช้การเชื่อมต่ออินเทอร์เน็ต คุณเปิดใช้บริการนี้ได้อย่างง่ายดายใน Play Console โดยนักพัฒนาแอปไม่จำเป็นต้องดำเนินการใดๆ ก่อนการทดสอบและไม่ต้องผสานรวมเซิร์ฟเวอร์แบ็กเอนด์ การปกป้องอัตโนมัติสามารถเพิ่มฟีเจอร์ต่อไปนี้ลงในเกม
- การตรวจสอบโปรแกรมติดตั้ง: การปกป้องโดยอัตโนมัติสามารถเพิ่มการตรวจสอบโปรแกรมติดตั้งของ Google Play ลงในโค้ดของแอป ซึ่งจะเกิดขึ้นขณะรันไทม์เมื่อแอปเปิดขึ้น หากตรวจสอบโปรแกรมติดตั้งไม่สำเร็จ ระบบจะแสดงข้อความเตือนให้ผู้ใช้ดาวน์โหลดแอปของคุณจาก Google Play
- การป้องกันการปลอมแปลง
(ฟีเจอร์นี้พร้อมใช้งานสำหรับพาร์ทเนอร์ Play บางรายเท่านั้น):
การปกป้องอัตโนมัติสามารถเพิ่มการตรวจสอบรันไทม์ลงในโค้ดของแอปเพื่อตรวจหาการปรับเปลี่ยนและใช้เทคนิคการปรับให้ยากต่อการอ่าน (Obfuscation) ขั้นสูงเพื่อป้องกันไม่ให้นำการตรวจสอบออกหรือทำวิศวกรรมย้อนกลับ หากการตรวจสอบไม่สำเร็จ ระบบจะแสดงข้อความเตือนให้ผู้ใช้ดาวน์โหลดแอปของคุณจาก Google Play ไม่เช่นนั้นแอปจะไม่ทำงาน
การปกป้องอัตโนมัติไม่จําเป็นต้องเปลี่ยนแปลงโค้ดหรือให้นักพัฒนาซอฟต์แวร์ทํางานใดๆ ก่อนการทดสอบ ดูข้อมูลเพิ่มเติมเกี่ยวกับการปกป้องอัตโนมัติในศูนย์ช่วยเหลือของ Play Console
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[null,null,["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],null,["# Integrity protection for Google Play Games on PC\n\nGoogle Play Games on PC supports integrity protection through the Play\nIntegrity API and several other Google Play features to help ensure that\nyour game hasn't been tampered with or installed from an untrustworthy source.\n\nPlay Integrity API\n------------------\n\nThe [Play Integrity API](/google/play/integrity) helps protect your\ngames from potentially risky and fraudulent interactions. The API\nenables you to reduce attacks and abuse such as\nfraud, cheating, and unauthorized access. The\n[Play Integrity API](/google/play/integrity) replaces the\nSafetyNet Attestation API (SNAA) and Play App Licencing API.\nSNAA does not work with Google Play Games on PC.\n\n### Device Integrity Field\n\nThe\n[`deviceRecognitionVerdict`](/google/play/integrity/verdict#device-integrity-field)\nfield contains a single value, `deviceRecognitionVerdict`,\nthat represents how well a device can enforce app integrity. By default,\n`deviceRecognitionVerdict` can have one of these values:\n\n- `MEETS_DEVICE_INTEGRITY`: The app is running on an Android-powered device with Google Play services. The device passes system integrity checks and meets Android compatibility requirements.\n- `MEETS_VIRTUAL_INTEGRITY`: The app is running in a virtual Android environment with Google Play services, currently limited to Google Play Games on PC. The environment meets core Android compatibility requirements and passes Google Play integrity checks.\n- None (a blank value): The app is running on a device that has signs of attack (such as API hooking) or system compromise (such as being rooted), or the app is running on a non-physical device (such as an emulator) that does not pass Google Play integrity checks.\n\nThe Play Integrity API uses the `deviceRecognitionVerdict` value\n`MEETS_VIRTUAL_INTEGRITY` to indicate that the game is running on Google Play Games on PC. Here's an example of a passing response from\nthe Play Integrity API: \n\n deviceIntegrity: {\n // \"MEETS_VIRTUAL_INTEGRITY\" indicates the game is running on Google Play Games on PC\n deviceRecognitionVerdict: [\"MEETS_VIRTUAL_INTEGRITY\"]\n }\n\nIf you have a cross-platform game available on both mobile and\nGoogle Play Games on PC, make sure your\nvalidation logic checks for both `MEETS_VIRTUAL_INTEGRITY` and\n`MEETS_DEVICE_INTEGRITY`.\n\nAutomatic protection\n--------------------\n\nGoogle Play's [automatic protection](https://support.google.com/googleplay/android-developer/answer/10183279) is a service\nthat helps you protect your game against unauthorized redistribution and\npiracy. When users get your protected app from an unknown distribution\nchannel, they'll be prompted to get your official app from\nGoogle Play. Automatic protection works in your app without a data\nconnection. It can be turned on with one click in the\nPlay Console, and requires no developer work before testing and no\nbackend server integration. Automatic protection can add the following\nfeatures to your game:\n\n- **Installer checks**: Automatic protection can add Google Play installer checks to your app's code that happen at runtime when your app is opened. If the installer checks fail, users will be prompted to get your app on Google Play.\n- **Anti-tamper protection** **(this feature is only available to selected Play partners)**: Automatic protection can add runtime checks to your app's code to detect modification and use advanced obfuscation techniques to prevent the checks from being removed or reverse engineered. If the checks fail, the user will be prompted to get your app on Google Play or the app will not run.\n\nAutomatic protection requires no code changes or developer work before\ntesting. Learn more about\n[automatic protection in the Play Console help center](https://support.google.com/googleplay/android-developer/answer/10183279)."]]