Informationen dazu, wie die SafetyNet Safe Browsing API Dienste zum Ermitteln bereitstellt, ob eine URL von Google als bekannte Bedrohung gekennzeichnet wurde
Alle Inhalte und Codebeispiele auf dieser Seite unterliegen den Lizenzen wie im Abschnitt Inhaltslizenz beschrieben. Java und OpenJDK sind Marken oder eingetragene Marken von Oracle und/oder seinen Tochtergesellschaften.
Zuletzt aktualisiert: 2025-08-17 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-08-17 (UTC)."],[],[],null,["# How to add the SafetyNet API dependency\n\n| **Warning:** The SafetyNet Attestation API is deprecated and has been replaced by the [Play Integrity API](/google/play/integrity/overview). The SafetyNet reCAPTCHA API is being deprecated and replaced with [reCAPTCHA](https://cloud.google.com/recaptcha/docs/instrument-android-apps).\n\nThis page explains how to add SafetyNet APIs to your app.\n\nBefore you begin\n----------------\n\nTo prepare your app, first make sure that your app's build file uses the\nfollowing values:\n\n- A `minSdkVersion` of `19` or higher\n- A `compileSdkVersion` of `28` or higher\n\nThen complete the steps in the following sections.\n\nConfigure your app\n------------------\n\nIn your `settings.gradle` file, include\n[Google's Maven repository](https://maven.google.com/web/index.html)\nand [Maven central repository](https://search.maven.org/artifact)\nin both your `dependencyResolutionManagement` and `pluginManagement` repository sections: \n\n pluginManagement {\n repositories {\n ...\n google()\n mavenCentral()\n }\n }\n\n dependencyResolutionManagement {\n ...\n repositories {\n google()\n mavenCentral()\n }\n }\n\nAdd the [Google Play services](http://developer.google.com/android)\ndependency for the Google Play API to your\n[module's Gradle build file](/studio/build#module-level),\nwhich is commonly `app/build.gradle`: \n\n dependencies {\n implementation 'com.google.android.gms:play-services-safetynet:18.1.0'\n }\n\nMore information\n----------------\n\n**[SafetyNet Safe Browsing API](/training/safetynet/safebrowsing)**\n: Learn how the SafetyNet Safe Browsing API provides services for determining\n whether a URL has been marked as a known threat by Google.\n\n**[SafetyNet reCAPTCHA API](/training/safetynet/recaptcha)**\n: Learn how the SafetyNet reCAPTCHA API protects your app from malicious\n traffic.\n\n**[SafetyNet Verify Apps API](/training/safetynet/verify-apps)**\n: Learn how the SafetyNet Verify Apps API protects devices against potentially\n harmful apps.\n\nAdditional resources\n--------------------\n\n- [Security tips](/training/articles/security-tips)\n- [Compatibility Test Suite (CTS)](https://source.android.com/compatibility/cts)"]]