Protezione dell'integrità per Google Play Giochi su PC
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Google Play Giochi su PC supporta la protezione dell'integrità tramite l'API Play Integrity e diverse altre funzionalità di Google Play per contribuire a garantire che il tuo gioco non sia stato manomesso o installato da una fonte non attendibile.
API Play Integrity
L'API Play Integrity ti aiuta a proteggere i tuoi giochi da interazioni potenzialmente rischiose e fraudolente. L'API consente di ridurre attacchi e abusi quali attività fraudolente, truffe e accessi non autorizzati. L'API Play Integrity sostituisce l'API SafetyNet Attestation (SNAA) e l'API Play App Licencing.
SNAA non funziona con Google Play Giochi su PC.
Campo Integrità del dispositivo
Il
campo
deviceRecognitionVerdict contiene un singolo valore, deviceRecognitionVerdict,
che rappresenta il livello di applicazione dell'integrità dell'app da parte di un dispositivo. Per impostazione predefinita,
deviceRecognitionVerdict può avere uno di questi valori:
MEETS_DEVICE_INTEGRITY: l'app è in esecuzione su un dispositivo Android con Google Play Services. Il dispositivo supera i controlli relativi all'integrità del sistema e soddisfa i requisiti di compatibilità di Android.
MEETS_VIRTUAL_INTEGRITY: l'app è in esecuzione in un ambiente Android virtuale con Google Play Services, attualmente limitato a Google Play Giochi su PC. L'ambiente soddisfa i requisiti fondamentali di compatibilità con Android e supera i controlli di integrità di Google Play.
Nessuno (un valore vuoto): l'app è in esecuzione su un dispositivo per cui sono stati rilevati segnali di attacco (come l'hook delle API) o una compromissione del sistema (ad esempio il rooting) oppure l'app è in esecuzione su un dispositivo non fisico (ad esempio un emulatore) che non supera i controlli relativi all'integrità di Google Play.
L'API Play Integrity utilizza il valore deviceRecognitionVerdictMEETS_VIRTUAL_INTEGRITY per indicare che il gioco è in esecuzione su Google Play Giochi su PC. Ecco un esempio di risposta positiva dell'API Play Integrity:
deviceIntegrity:{// "MEETS_VIRTUAL_INTEGRITY" indicates the game is running on Google Play Games on PCdeviceRecognitionVerdict:["MEETS_VIRTUAL_INTEGRITY"]}
Se hai un gioco multipiattaforma disponibile sia su dispositivi mobili che su Google Play Giochi su PC, assicurati che la logica di convalida controlli sia MEETS_VIRTUAL_INTEGRITY sia MEETS_DEVICE_INTEGRITY.
Protezione automatica
La protezione automatica di Google Play è un servizio che ti consente di proteggere il tuo gioco da pirateria e ridistribuzione non autorizzata. Quando gli utenti scaricano la tua app protetta da un canale di distribuzione sconosciuto, viene loro chiesto di scaricare la tua app ufficiale da Google Play. Protezione automatica funziona nella tua app senza connessione
dati. Può essere attivata con un solo clic in
Play Console e non richiede alcuna operazione da parte dello sviluppatore prima del test né l'integrazione del
server di backend. Protezione automatica può aggiungere le seguenti funzionalità al tuo gioco:
Controlli del programma di installazione: Protezione automatica può aggiungere al codice della tua app controlli del programma di installazione di Google Play, che vengono eseguiti in fase di runtime quando l'app viene aperta. Se i controlli del programma di installazione non vengono superati, agli utenti verrà chiesto di scaricare la tua app da Google Play.
Protezione anti-manomissione(questa funzionalità è disponibile solo per partner di Google Play selezionati):
Protezione automatica può aggiungere controlli di runtime al codice della tua app per rilevare
le modifiche e utilizzare tecniche di offuscamento avanzate per impedire la rimozione o il reverse engineering dei controlli. Se i controlli non vanno a buon fine, all'utente verrà chiesto di scaricare la tua app da Google Play, altrimenti questa non verrà eseguita.
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-27 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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)."]]