<br />

To develop an app using [Google Play services
APIs](https://developers.google.com/android/reference/packages), follow the instructions on this page to set
up your project with the relevant SDKs, which are available from the
[Google maven repository](https://maven.google.com/web/index.html#com.google.android.gms).

To test your app when using Google Play services, you must use one of the
following:

- A compatible Android device that runs Android 7.0 (API level 24) or higher and has the Google Play Store app installed.
- The Android emulator with an [AVD](https://developer.android.com/tools/devices) that runs the Google APIs platform based on Android 7.0 (API level 24) 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:

1. Open the `build.gradle` file inside your app's module directory.

   > [!NOTE]
   > **Note:** Android Studio projects contain a top-level `build.gradle` file and a `build.gradle` file for each module. Be sure to edit the file for your app's module. Learn more about [building your project with
   > Gradle](https://developer.android.com/sdk/installing/studio-build.html).

2. For each SDK that your app requires, include the dependency for that SDK.
   This page includes a section that lists common [Google Play services
   dependencies](https://developers.google.com/android/guides/setup#list-dependencies) for Android apps. You might also want to [add
   Firebase to your
   project](https://firebase.google.com/docs/android/setup).

3. Save the changes and [sync your
   project](https://developer.android.com/studio/build#sync-files).

The following snippet shows an example `build.gradle` file that uses the
location library:

    apply plugin: 'com.android.application'

    ...

    dependencies {
        implementation 'com.google.android.gms:play-services-location:21.4.0'
    }

New versions of the Google Play services SDKs with bug fixes and new features
are periodically released. These updates are announced in the [release
notes](https://developers.google.com/android/guides/releases). If your app uses a dependency that has been
updated, change to the latest version in your app's dependencies to take
advantage of these fixes.

> [!NOTE]
> **Note:** To preserve the required classes, the Google Play services SDKs each include directives that instruct R8 on how to [optimize your
> app](https://developer.android.com/studio/build/shrink-code).

## Check whether Google Play services is installed

As described in the [Overview of Google Play services](https://developers.google.com/android/guides/overview.md.txt)
, Google Play services is automatically updated on Android
7.0 (API level 24) and higher
through the Google Play Store app. However, devices without the Google Play
Store don't have Google Play services installed. If your app runs on devices
without Google Play services, you should always check if Google Play services is
installed before you attempt to use Google APIs or enable features
that require it.

To check for the presence of Google Play services on the device, use the
[`isGooglePlayServicesAvailable()`](https://developers.google.com/android/reference/com/google/android/gms/common/GoogleApiAvailability.md.txt#isGooglePlayServicesAvailable(android.content.Context))
method.

To then begin a connection to Google Play services, or learn how to detect
whether the version of Google Play services installed supports a specific API,
read the guide on [Accessing Google APIs](https://developers.google.com/android/guides/api-client.md.txt).

## Google Play services dependencies

The following table lists the dependencies for Google Play services that you can
include in your Android app. You can filter the list by device type by selecting
one of the buttons, and you can search for a specific use case or dependency
name by entering text into the box that appears after the buttons.

<button value="phone-tablet" default="">Phones and Tablets</button> <button value="android-tv">Android TV</button> <button value="auto">Auto</button> <button value="android-go">Android Go</button> <button value="chrome-os">ChromeOS</button> <button value="wear-os">Wear OS</button>

| Use case and dependency name | Supported devices |
|---|---|
| [Google Mobile Ads](https://developers.google.com/admob/android/quick-start.md.txt) `com.google.android.gms:play-services-ads:25.5.0` | Phone, Tablet |
| [Android Advertising ID (AAID)](https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.md.txt) `com.google.android.gms:play-services-ads-identifier:18.3.0` | Phone, Tablet, Android TV, ChromeOS |
| [Lightweight version of Google Mobile Ads](https://developers.google.com/admob/android/lite-sdk.md.txt) `com.google.android.gms:play-services-ads-lite:25.0.0` | Phone, Tablet |
| [AdSense for Search (AFS) Custom Search Ads (CSA)](https://developers.google.com/custom-search-ads) `com.google.android.gms:play-services-afs-native:19.1.0` | Phone, Tablet, ChromeOS |
| Google Analytics Services SDK for Android `com.google.android.gms:play-services-analytics:18.1.1` | *Deprecated.* Use [Google Analytics for Firebase](https://firebase.google.com/docs/analytics/get-started?platform=android) instead. |
| [App Index](https://developers.google.com/android/reference/com/google/android/gms/appindex/package-summary.md.txt) `com.google.android.gms:play-services-appindex:16.2.0` | Phone, Tablet, Android TV |
| [AppSearch](https://developers.google.com/android/reference/com/google/android/gms/appsearch/package-summary.md.txt) `com.google.android.gms:play-services-appsearch:16.0.1` | Phone, Tablet, Android TV |
| [Android App Set ID](https://developer.android.com/training/articles/app-set-id) `com.google.android.gms:play-services-appset:16.1.0` | Phone, Tablet, Android TV, ChromeOS |
| [Google Sign-In for Android](https://developers.google.com/identity/sign-in/android) `com.google.android.gms:play-services-auth:22.0.0` | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS |
| [SMS Retriever API](https://developers.google.com/identity/sms-retriever/request) `com.google.android.gms:play-services-auth-api-phone:18.3.1` | Phone, Tablet, Android Go |
| [Block Store API (includes user credential storage)](https://developers.google.com/identity/blockstore/android) `com.google.android.gms:play-services-auth-blockstore:16.4.0` | Phone, Tablet, Android Go, ChromeOS |
| [Google Awareness API](https://developers.google.com/awareness) `com.google.android.gms:play-services-awareness:20.0.0` | Phone, Tablet, Auto, Android Go, ChromeOS |
| [Utility classes](https://developers.google.com/android/reference/com/google/android/gms/common/package-summary.md.txt) `com.google.android.gms:play-services-base:18.11.1` | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS |
| Testing fakes for utility classes `com.google.android.gms:play-services-base-testing:16.2.0` | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS |
| More utility classes `com.google.android.gms:play-services-basement:18.12.0` | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS |
| [Camera Low Light Boost](https://developers.google.com/android/reference/com/google/android/gms/cameralowlight/package-summary.md.txt) `com.google.android.gms:play-services-camera-low-light-boost:16.0.1-beta09` | Phone, Tablet |
| [Google Cast](https://developers.google.com/cast) `com.google.android.gms:play-services-cast:23.0.0` | Phone, Tablet, Android Go, ChromeOS |
| [Google Cast Application Framework (CAF)](https://developers.google.com/cast/docs/android_sender.md.txt) `com.google.android.gms:play-services-cast-framework:23.0.0` | Phone, Tablet, Android Go, ChromeOS |
| [Google Code Scanner](https://developers.google.com/ml-kit/code-scanner) `com.google.android.gms:play-services-code-scanner:16.1.0` | Phone, Tablet, Android Go, ChromeOS |
| [Chromium network stack (Cronet)](https://developer.android.com/guide/topics/connectivity/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)](https://developer.android.com/multi-device-development) `com.google.android.gms:play-services-dtdi:16.0.0-beta03` | Phone, Tablet, Android Go |
| [Key Verifier SDK](https://developer.android.com/privacy-and-security/key-verifier) `com.google.android.gms:contactkeys:16.0.0` | Phone, Tablet |
| [Fast IDentity Online (FIDO) Authentication](https://developers.google.com/identity/fido) `com.google.android.gms:play-services-fido:21.3.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](https://developers.google.com/fit/android.md.txt) and [Recording API on mobile](https://developer.android.com/health-and-fitness/guides/recording-api) (for user fitness data) `com.google.android.gms:play-services-fitness:21.3.0` | Phone, Tablet, Android Go, ChromeOS, Wear OS |
| [Fraud Protect](https://developers.google.com/android/reference/com/google/android/gms/fraudprotect/package-summary.md.txt) `com.google.android.gms:play-services-fraudprotect:16.0.1` | Phone, Tablet, Android Go |
| [Google Play Games Services v2 for Android](https://developers.google.com/games/services/android/quickstart) `com.google.android.gms:play-services-games-v2:22.1.0` | Phone, Tablet, Android TV, Android Go, ChromeOS |
| [Google Play Games Services v2 Native C SDK for Android](https://developer.android.com/games/pgs/cpp/cpp-start) `com.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 Android](https://developers.google.com/games/services/v1/android/quickstart) `com.google.android.gms:play-services-games:25.0.0` | *Deprecated.* Use [Google Play Games Services v2](https://developers.google.com/games/services/android/quickstart) instead. |
| [Matter API](https://developers.home.google.com/matter) `com.google.android.gms:play-services-home:16.0.0` | Phone, Tablet |
| [Google Play Instant](https://developer.android.com/topic/google-play-instant/overview) `com.google.android.gms:play-services-instantapps:18.2.0` | *Deprecated.* See [Google Play Instant](https://developer.android.com/topic/google-play-instant) for more information. |
| [Location Services for Android](https://developer.android.com/training/location) `com.google.android.gms:play-services-location:21.4.0` | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS |
| [Google Maps SDK for Android](https://developers.google.com/maps/documentation/android-sdk/overview.md.txt) `com.google.android.gms:play-services-maps:20.1.0` | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS |
| [Google Maps 3D SDK for Android](https://developers.google.com/maps/documentation/maps-3d/android-sdk/overview.md.txt) `com.google.android.gms:play-services-maps3d:16.0.1` | Phone, Tablet |
| [Media Effect Enhancement](https://developers.google.com/android/reference/com/google/android/gms/media/effect/enhancement/package-summary.md.txt) `com.google.android.gms:play-services-media-effect-enhancement:16.0.0-beta10` | Phone, Tablet |
| [Media Effect Studio Sound](https://developers.google.com/android/reference/com/google/android/gms/media/effect/studiosound/package-summary.md.txt) `com.google.android.gms:play-services-media-effect-studiosound:16.0.0-beta03` | Phone, Tablet |
| [ML Kit barcode scanning](https://developers.google.com/ml-kit/vision/barcode-scanning/android.md.txt) `com.google.android.gms:play-services-mlkit-barcode-scanning:18.3.1` | Phone, Tablet, Android Go, ChromeOS |
| [ML Kit document scanner](https://developers.google.com/ml-kit/vision/doc-scanner.md.txt) `com.google.android.gms:play-services-mlkit-document-scanner:16.0.0` | Phone, Tablet, Android Go, ChromeOS |
| [ML Kit face detection](https://developers.google.com/ml-kit/vision/face-detection/android.md.txt) `com.google.android.gms:play-services-mlkit-face-detection:17.1.0` | Phone, Tablet, Android Go, ChromeOS |
| [ML Kit image labeling](https://developers.google.com/ml-kit/vision/image-labeling.md.txt) `com.google.android.gms:play-services-mlkit-image-labeling:16.0.8` | Phone, Tablet, Android Go, ChromeOS |
| [ML Kit image labeling custom](https://developers.google.com/ml-kit/vision/image-labeling/custom-models/android.md.txt) `com.google.android.gms:play-services-mlkit-image-labeling-custom:16.0.0-beta5` | Phone, Tablet, Android Go, ChromeOS |
| [ML Kit language identification](https://developers.google.com/ml-kit/language/identification.md.txt) `com.google.android.gms:play-services-mlkit-language-id:17.0.0` | Phone, Tablet, Android Go, ChromeOS |
| [ML Kit smart reply](https://developers.google.com/ml-kit/language/smart-reply.md.txt) `com.google.android.gms:play-services-mlkit-smart-reply:16.0.0-beta1` | Phone, Tablet, Android Go, ChromeOS |
| [ML Kit subject segmentation](https://developers.google.com/ml-kit/vision/subject-segmentation.md.txt) `com.google.android.gms:play-services-mlkit-subject-segmentation:16.0.0-beta1` | Phone, Tablet, Android Go, ChromeOS |
| [ML Kit text recognition](https://developers.google.com/ml-kit/vision/text-recognition/android) `com.google.android.gms:play-services-mlkit-text-recognition:19.0.2` | Phone, Tablet, Android Go, ChromeOS |
| [ML Kit text recognition for Chinese](https://developers.google.com/ml-kit/vision/text-recognition/android) `com.google.android.gms:play-services-mlkit-text-recognition-chinese:16.0.2` | Phone, Tablet, Android Go, ChromeOS |
| [ML Kit text recognition for Devanagari](https://developers.google.com/ml-kit/vision/text-recognition/android) `com.google.android.gms:play-services-mlkit-text-recognition-devanagari:16.0.2` | Phone, Tablet, Android Go, ChromeOS |
| [ML Kit text recognition for Japanese](https://developers.google.com/ml-kit/vision/text-recognition/android) `com.google.android.gms:play-services-mlkit-text-recognition-japanese:16.0.2` | Phone, Tablet, Android Go, ChromeOS |
| [ML Kit text recognition for Korean](https://developers.google.com/ml-kit/vision/text-recognition/android) `com.google.android.gms:play-services-mlkit-text-recognition-korean:16.0.2` | Phone, Tablet, Android Go, ChromeOS |
| [Nearby device discovery and connection](https://developers.google.com/nearby) `com.google.android.gms:play-services-nearby:19.5.1` | Phone, Tablet, Android TV, Auto, Android Go |
| [Show open-source licenses](https://developers.google.com/android/guides/opensource.md.txt) `com.google.android.gms:play-services-oss-licenses:17.5.3` | 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)](https://developers.google.com/ad-manager/pal/android) `com.google.android.gms:play-services-pal:23.0.0` | Phone, Tablet, Android TV *Supported on devices that run Android 5.0 (API level 21) or higher.* |
| [Screen lock quality check](https://developer.android.com/work/versions/android-10#screen_lock_quality_check) `com.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](https://developers.google.com/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 instrumentation](https://cloud.google.com/recaptcha-enterprise/docs/instrument-android-apps) `com.google.android.gms:play-services-recaptcha:17.1.0` | Phone, Tablet, Android TV, Android Go, ChromeOS |
| [Remote Gestures API](https://developers.google.com/android/reference/com/google/android/gms/remotegestures/package-summary.md.txt) `com.google.android.gms:play-services-remotegestures:16.0.0` | Phone, Tablet |
| [Safe Browsing v5](https://developer.android.com/training/safebrowsing) `com.google.android.gms:play-services-safebrowsing:16.0.0` | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS |
| [SafetyNet APIs (includes safe browsing and verify apps)](https://developer.android.com/training/safetynet) `com.google.android.gms:play-services-safetynet:18.1.0` | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS |
| [Google Tag Manager](https://developers.google.com/tag-manager/android/v5) `com.google.android.gms:play-services-tagmanager:18.3.0` | Phone, Tablet, Android TV, Android Go, ChromeOS |
| [Tasks API on Android](https://developers.google.com/android/guides/tasks.md.txt) `com.google.android.gms:play-services-tasks:18.4.1` | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS |
| [LiteRT for Google Play services](https://developers.google.com/edge/litert/android/play_services.md.txt) `com.google.android.gms:play-services-litert:17.0.0` | Phone, Tablet, Auto, Android Go, ChromeOS, Wear OS |
| [Acceleration Service for Android](https://www.tensorflow.org/lite/android/acceleration_service) `com.google.android.gms:play-services-tflite-acceleration-service:16.5.0-beta02` | Phone, Tablet, Android Go, ChromeOS |
| [TensorFlow Lite GPU Delegate API for Google Play services](https://www.tensorflow.org/lite/android/play_services) `com.google.android.gms:play-services-tflite-gpu:16.5.0` | Phone, Tablet, Android Go, ChromeOS |
| [TensorFlow Lite Java API for Google Play services](https://www.tensorflow.org/lite/android/play_services) `com.google.android.gms:play-services-tflite-java:16.5.0` | Phone, Tablet, Android Go, ChromeOS |
| [TensorFlow Lite Support API for Google Play services](https://www.tensorflow.org/lite/android/play_services) `com.google.android.gms:play-services-tflite-support:16.5.0` | Phone, Tablet, Android Go, ChromeOS |
| [Thread Network API](https://developers.home.google.com/thread) `com.google.android.gms:play-services-threadnetwork:16.3.0` | Phone, Tablet |
| [Trusted Time API](https://developers.google.com/location-context/time) `com.google.android.gms:play-services-time:16.0.1` | Phone, Tablet, Auto, Android Go, Wear OS |
| [Mobile Vision](https://developers.google.com/vision) `com.google.android.gms:play-services-vision:20.1.3` | Phone, Tablet, Android Go, ChromeOS |
| [Google Pay for Payments on Android](https://developers.google.com/pay/api/android/overview.md.txt) `com.google.android.gms:play-services-wallet:20.0.0` | Phone, Tablet, Auto, Android Go, ChromeOS, Wear OS |
| [Wearable Data Layer API](https://developer.android.com/training/wearables/data-layer) `com.google.android.gms:play-services-wearable:20.0.1` | Phone, Tablet, Wear OS |
[**Table 1.** Google Play services dependencies to include in
Android apps]

## Gradle plugins

Google Play services also includes several Gradle plugins, as shown in the
following table. Note that the buttons that appear before the previous table
don't change the information that appears in this table.

| Use case and Gradle plugin name | Supported devices |
| [Show open-source licenses](https://developers.google.com/android/guides/opensource.md.txt) `com.google.android.gms:oss-licenses-plugin:0.13.0` | Phone, Tablet, ChromeOS |
| [Strict version checking](https://developers.google.com/android/guides/versioning.md.txt#standalone_version_matcher_plugin) `com.google.android.gms:strict-version-matcher-plugin:1.2.4` | Phone, Tablet, Android TV, Auto, Android Go, ChromeOS, Wear OS |
|---|---|
[**Table 2.** List of Gradle plugins included in Google Play
services]