Set up Google Play services Stay organized with collections Save and categorize content based on your preferences.
AI-generated Key Takeaways
To develop apps using Google Play services APIs, set up your project with relevant SDKs from the Google maven repository and test on a compatible Android device or emulator.
To use Google Play services APIs, you need to declare the required SDK dependencies in your app's module-level
build.gradlefile.You should check for the presence of Google Play services on a device using the
isGooglePlayServicesAvailable()method before attempting to use Google APIs, as devices without the Google Play Store do not have it installed.New versions of Google Play services SDKs are released periodically with updates and bug fixes, and updating your dependencies allows you to benefit from these improvements.
Google Play services also includes several Gradle plugins that can be included in your project for various use cases.
To develop an app usingGoogle Play servicesAPIs, follow the instructions on this page to setup your project with the relevant SDKs, which are available from theGoogle maven repository.
To test your app when using Google Play services, you must use one of thefollowing:
- A compatible Android device that runs Android 6.0 (APIlevel 23) or higher and has the Google Play Store appinstalled.
- The Android emulator with anAVD that runs the Google APIsplatform based on Android 6.0 (API level 23) or higher.
Declare dependencies for Google Play services
To develop features that depend on the Google Play services APIs in your app,complete the following steps:
Open the
Note: Android Studio projects contain a top-levelbuild.gradlefile inside your app's module directory.build.gradlefile and abuild.gradlefile for each module. Be sure to edit the file for your app'smodule. Learn more aboutbuilding your project withGradle.For each SDK that your app requires, include the dependency for that SDK.This page includes a section that lists commonGoogle Play servicesdependencies for Android apps. You might also want toaddFirebase to yourproject.
Save the changes andsync yourproject.
The following snippet shows an examplebuild.gradle file that uses thelocation library:
applyplugin:'com.android.application'...dependencies{implementation'com.google.android.gms:play-services-location:21.3.0'}New versions of the Google Play services SDKs with bug fixes and new featuresare periodically released. These updates are announced in thereleasenotes. If your app uses a dependency that has beenupdated, change to the latest version in your app's dependencies to takeadvantage of these fixes.
Note: To preserve the required classes, the Google Play services SDKs eachinclude directives that instruct R8 on how tooptimize yourapp.Check whether Google Play services is installed
As described in theOverview of Google Play services, Google Play services is automatically updated on Android6.0 (API level 23) and higherthrough the Google Play Store app. However, devices without the Google PlayStore don't have Google Play services installed. If your app runs on deviceswithout Google Play services, you should always check if Google Play services isinstalled before you attempt to use Google APIs or enable featuresthat require it.
To check for the presence of Google Play services on the device, use theisGooglePlayServicesAvailable()method.
To then begin a connection to Google Play services, or learn how to detectwhether the version of Google Play services installed supports a specific API,read the guide onAccessing Google APIs.
Google Play services dependencies
The following table lists the dependencies for Google Play services that you caninclude in your Android app. You can filter the list by device type by selectingone of the buttons, and you can search for a specific use case or dependencyname by entering text into the box that appears after the buttons.
| Use case and dependency name | Supported devices |
|---|---|
Google Mobile Adscom.google.android.gms:play-services-ads:24.8.0 | Phone, Tablet |
Android Advertising ID (AAID)com.google.android.gms:play-services-ads-identifier:18.2.0 | Phone, Tablet, Android TV, ChromeOS |
Lightweight version of Google Mobile Adscom.google.android.gms:play-services-ads-lite:24.6.0 | Phone, Tablet |
AdSense for Search (AFS) Custom Search Ads (CSA)com.google.android.gms:play-services-afs-native:19.1.0 | Phone, Tablet, ChromeOS |
Google Analytics Services SDK for Androidcom.google.android.gms:play-services-analytics:18.1.1 | Deprecated. UseGoogle Analytics for Firebase instead. |
App Indexcom.google.android.gms:play-services-appindex:16.2.0 | Phone, Tablet, Android TV |
AppSearchcom.google.android.gms:play-services-appsearch:16.0.1 | Phone, Tablet, Android TV |
Android App Set IDcom.google.android.gms:play-services-appset:16.1.0 | Phone, Tablet, Android TV, ChromeOS |
Google Sign-In for Androidcom.google.android.gms:play-services-auth:21.4.0 | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS |
SMS Retriever APIcom.google.android.gms:play-services-auth-api-phone:18.3.0 | Phone, Tablet, Android Go |
Block Store API (includes user credential storage)com.google.android.gms:play-services-auth-blockstore:16.4.0 | Phone, Tablet, Android Go, ChromeOS |
Google Awareness APIcom.google.android.gms:play-services-awareness:19.1.0 | Phone, Tablet, Auto, Android Go, ChromeOS |
Utility classescom.google.android.gms:play-services-base:18.9.0 | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS |
Testing fakes for utility classescom.google.android.gms:play-services-base-testing:16.2.0 | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS |
More utility classescom.google.android.gms:play-services-basement:18.9.0 | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS |
Camera Low Light Boostcom.google.android.gms:play-services-camera-low-light-boost:16.0.1-beta06 | Phone, Tablet |
Google Castcom.google.android.gms:play-services-cast:22.2.0 | Phone, Tablet, Android Go, ChromeOS |
Google Cast Application Framework (CAF)com.google.android.gms:play-services-cast-framework:22.2.0 | Phone, Tablet, Android Go, ChromeOS |
Google Code Scannercom.google.android.gms:play-services-code-scanner:16.1.0 | Phone, Tablet, Android Go, ChromeOS |
Chromium network stack (Cronet)com.google.android.gms:play-services-cronet:18.1.1 | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS |
Device-to-device interactions (DTDI)com.google.android.gms:play-services-dtdi:16.0.0-beta02 | Phone, Tablet, Android Go |
Fast IDentity Online (FIDO) Authenticationcom.google.android.gms:play-services-fido:21.2.0 | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS Supported on devices that run Android 7.0 (API level 24) or higher. |
Google Fit API for Android andRecording API on mobile (for user fitness data)com.google.android.gms:play-services-fitness:21.3.0 | Phone, Tablet, Android Go, ChromeOS, Wear OS |
Google Play Games Services v2 for Androidcom.google.android.gms:play-services-games-v2:21.0.0 | Phone, Tablet, Android TV, Android Go, ChromeOS |
Google Play Games Services v2 Native C SDK for Androidcom.google.android.gms:play-services-games-v2-native-c:17.0.0-beta1 | Phone, Tablet, Android TV, Android Go, ChromeOS |
Google Play Games Services v1 for Androidcom.google.android.gms:play-services-games:24.0.0 | Phone, Tablet, Android TV, Android Go, ChromeOS |
Matter APIcom.google.android.gms:play-services-home:16.0.0 | Phone, Tablet |
Google Play Instantcom.google.android.gms:play-services-instantapps:18.2.0 | Deprecated. SeeGoogle Play Instant for more information. |
Location Services for Androidcom.google.android.gms:play-services-location:21.3.0 | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS |
Google Maps SDK for Androidcom.google.android.gms:play-services-maps:19.2.0 | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS |
Google Maps 3D SDK for Androidcom.google.android.gms:play-services-maps3d:0.1.0 | Phone, Tablet |
ML Kit barcode scanningcom.google.android.gms:play-services-mlkit-barcode-scanning:18.3.1 | Phone, Tablet, Android Go, ChromeOS |
ML Kit document scannercom.google.android.gms:play-services-mlkit-document-scanner:16.0.0 | Phone, Tablet, Android Go, ChromeOS |
ML Kit face detectioncom.google.android.gms:play-services-mlkit-face-detection:17.1.0 | Phone, Tablet, Android Go, ChromeOS |
ML Kit image labelingcom.google.android.gms:play-services-mlkit-image-labeling:16.0.8 | Phone, Tablet, Android Go, ChromeOS |
ML Kit image labeling customcom.google.android.gms:play-services-mlkit-image-labeling-custom:16.0.0-beta5 | Phone, Tablet, Android Go, ChromeOS |
ML Kit language identificationcom.google.android.gms:play-services-mlkit-language-id:17.0.0 | Phone, Tablet, Android Go, ChromeOS |
ML Kit smart replycom.google.android.gms:play-services-mlkit-smart-reply:16.0.0-beta1 | Phone, Tablet, Android Go, ChromeOS |
ML Kit subject segmentationcom.google.android.gms:play-services-mlkit-subject-segmentation:16.0.0-beta1 | Phone, Tablet, Android Go, ChromeOS |
ML Kit text recognitioncom.google.android.gms:play-services-mlkit-text-recognition:19.0.1 | Phone, Tablet, Android Go, ChromeOS |
ML Kit text recognition for Chinesecom.google.android.gms:play-services-mlkit-text-recognition-chinese:16.0.1 | Phone, Tablet, Android Go, ChromeOS |
ML Kit text recognition for Devanagaricom.google.android.gms:play-services-mlkit-text-recognition-devanagari:16.0.1 | Phone, Tablet, Android Go, ChromeOS |
ML Kit text recognition for Japanesecom.google.android.gms:play-services-mlkit-text-recognition-japanese:16.0.1 | Phone, Tablet, Android Go, ChromeOS |
ML Kit text recognition for Koreancom.google.android.gms:play-services-mlkit-text-recognition-korean:16.0.1 | Phone, Tablet, Android Go, ChromeOS |
Nearby device discovery and connectioncom.google.android.gms:play-services-nearby:19.3.0 | Phone, Tablet, Android TV, Auto, Android Go |
Show open-source licensescom.google.android.gms:play-services-oss-licenses:17.3.0 | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS Supported on devices that run Android 5.0 (API level 21) or higher. |
Programmatic Access Libraries (PAL)com.google.android.gms:play-services-pal:22.1.0 | Phone, Tablet, Android TV Supported on devices that run Android 5.0 (API level 21) or higher. |
Screen lock quality checkcom.google.android.gms:play-services-password-complexity:18.1.0 | Phone, Tablet, Android Go, ChromeOS, Wear OS Supported on devices that run Android 4.4 (API level 19) to Android 9 (API level 28). |
Google Wallet (formerly Google Pay for Passes)com.google.android.gms:play-services-pay:16.5.0 | Phone, Tablet, Android Go, ChromeOS Supported on devices that run Android 5.0 (API level 20) or higher. |
reCAPTCHA Enterprise for app instrumentationcom.google.android.gms:play-services-recaptcha:17.1.0 | Phone, Tablet, Android TV, Android Go, ChromeOS |
SafetyNet APIs (includes safe browsing and verify apps)com.google.android.gms:play-services-safetynet:18.1.0 | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS |
Google Tag Managercom.google.android.gms:play-services-tagmanager:18.3.0 | Phone, Tablet, Android TV, Android Go, ChromeOS |
Tasks API on Androidcom.google.android.gms:play-services-tasks:18.4.0 | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS |
Acceleration Service for Androidcom.google.android.gms:play-services-tflite-acceleration-service:16.4.0-beta01 | Phone, Tablet, Android Go, ChromeOS |
TensorFlow Lite GPU Delegate API for Google Play servicescom.google.android.gms:play-services-tflite-gpu:16.4.0 | Phone, Tablet, Android Go, ChromeOS |
TensorFlow Lite Java API for Google Play servicescom.google.android.gms:play-services-tflite-java:16.4.0 | Phone, Tablet, Android Go, ChromeOS |
TensorFlow Lite Support API for Google Play servicescom.google.android.gms:play-services-tflite-support:16.4.0 | Phone, Tablet, Android Go, ChromeOS |
Thread Network APIcom.google.android.gms:play-services-threadnetwork:16.3.0 | Phone, Tablet |
Trusted Time APIcom.google.android.gms:play-services-time:16.0.1 | Phone, Tablet, Auto, Android Go, Wear OS |
Mobile Visioncom.google.android.gms:play-services-vision:20.1.3 | Phone, Tablet, Android Go, ChromeOS |
Google Pay for Payments on Androidcom.google.android.gms:play-services-wallet:19.5.0 | Phone, Tablet, Auto, Android Go, ChromeOS, Wear OS |
Wearable Data Layer APIcom.google.android.gms:play-services-wearable:19.0.0 | Phone, Tablet, Wear OS |
Gradle plugins
Google Play services also includes several Gradle plugins, as shown in thefollowing table. Note that the buttons that appear before the previous tabledon't change the information that appears in this table.
| Use case and Gradle plugin name | Supported devices |
|---|---|
Show open-source licensescom.google.android.gms:oss-licenses-plugin:0.10.9 | Phone, Tablet, ChromeOS |
Strict version checkingcom.google.android.gms:strict-version-matcher-plugin:1.2.4 | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-21 UTC.