To develop an app using Google Play services APIs, follow the 指示/教授/教育s on this page to 始める,決める up your 事業/計画(する) with the 関連した SDKs, which are 利用できる from the Google maven repository.
To 実験(する) your app when using Google Play services, you must use one of the に引き続いて:
- A 両立できる Android 装置 that runs Android 6.0 (API level 23) or higher and has the Google Play 蓄える/店 app 任命する/導入するd.
- The Android emulator with an AVD that runs the Google APIs 壇・綱領・公約 based on Android 6.0 (API level 23) or higher.
宣言する dependencies for Google Play services
To develop features that depend on the Google Play services APIs in your app, 完全にする the に引き続いて steps:
Open the
build.gradle
とじ込み/提出する inside your app's module directory.For each SDK that your app 要求するs, 含む the dependency for that SDK. This page 含むs a section that 名簿(に載せる)/表(にあげる)s ありふれた Google Play services dependencies for Android apps. You might also want to 追加する Firebase dependencies to your 事業/計画(する).
Save the changes and sync your 事業/計画(する).
The に引き続いて snippet shows an example build.gradle
とじ込み/提出する that uses the
場所 library:
適用する plugin: 'com.android.使用/適用'
...
dependencies {
実施 'com.google.android.gms:play-services-場所:21.3.0'
}
New 見解/翻訳/版s of the Google Play services SDKs with bug 直す/買収する,八百長をするs and new features are periodically 解放(する)d. These updates are 発表するd in the 解放(する) 公式文書,認めるs. If your app uses a dependency that has been updated, change to the 最新の 見解/翻訳/版 in your app's dependencies to take advantage of these 直す/買収する,八百長をするs.
Check whether Google Play services is 任命する/導入するd
As 述べるd in the Google Play services overview, Google Play services receives (a)自動的な/(n)自動拳銃 updates on Android 6.0 (API level 23) and higher through the Google Play 蓄える/店 app. However, Android 装置s without Google Play 蓄える/店 don't have Google Play services 任命する/導入するd. If your app runs on 装置s without Google Play services, you might want to check to see if Google Play services is 任命する/導入するd on the 装置 before you 試みる/企てる to use Google APIs, or enable features in your app that 要求する Google Play services to 機能(する)/行事.
To check for the presence of Google Play services on the 装置, use the
isGooglePlayServicesAvailable()
method.
To then begin a 関係 to Google Play services, or learn how to (悪事,秘密などを)発見する whether the 見解/翻訳/版 of Google Play services 任命する/導入するd supports a 明確な/細部 API, read the guide on 接近ing Google APIs.
Google Play services dependencies
The に引き続いて (米)棚上げする/(英)提議する 名簿(に載せる)/表(にあげる)s the dependencies for Google Play services that you can 含む in your Android app. You can filter the 名簿(に載せる)/表(にあげる) by 装置 type by selecting one of the buttons, and you can search for a 明確な/細部 use 事例/患者 or dependency 指名する by entering text into the box that appears after the buttons.
Use 事例/患者 and dependency 指名する | Supported 装置s |
---|---|
Google 動きやすい 広告scom.google.android.gms:play-services-広告s:24.4.0 |
Phone, Tablet |
Android Advertising ID (AAID)com.google.android.gms:play-services-広告s-identifier:18.2.0 |
Phone, Tablet, Android TV, ChromeOS |
Lightweight 見解/翻訳/版 of Google 動きやすい 広告scom.google.android.gms:play-services-広告s-lite:24.3.0 |
Phone, Tablet |
AdSense for Search (AFS) Custom Search 広告s (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. Use Google Analytics for Firebase instead. |
App 索引com.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 始める,決める IDcom.google.android.gms:play-services-appset:16.1.0 |
Phone, Tablet, Android TV, ChromeOS |
Google 調印する-In for Androidcom.google.android.gms:play-services-auth:21.3.0 |
Phone, Tablet, Android TV, 自動車, Android Go, ChromeOS |
SMS Retriever APIcom.google.android.gms:play-services-auth-api-phone:18.2.0 |
Phone, Tablet, Android Go |
封鎖する 蓄える/店 API (含むs 使用者 credential 貯蔵)com.google.android.gms:play-services-auth-blockstore:16.4.0 |
Phone, Tablet, Android Go, ChromeOS |
Google 認識/意識性 APIcom.google.android.gms:play-services-認識/意識性:19.1.0 |
Phone, Tablet, 自動車, Android Go, ChromeOS |
公共事業(料金)/有用性 classescom.google.android.gms:play-services-base:18.7.0 |
Phone, Tablet, Android TV, 自動車, Android Go, ChromeOS, Wear OS |
実験(する)ing 偽のs for 公共事業(料金)/有用性 classescom.google.android.gms:play-services-base-実験(する)ing:16.1.0 |
Phone, Tablet, Android TV, 自動車, Android Go, ChromeOS, Wear OS |
More 公共事業(料金)/有用性 classescom.google.android.gms:play-services-地階:18.7.0 |
Phone, Tablet, Android TV, 自動車, Android Go, ChromeOS, Wear OS |
Camera Low Light 上げるcom.google.android.gms:play-services-camera-low-light-上げる:16.0.1-beta01 |
Phone, Tablet |
Google Castcom.google.android.gms:play-services-cast:22.1.0 |
Phone, Tablet, Android Go, ChromeOS |
Google Cast 使用/適用 枠組み (CAF)com.google.android.gms:play-services-cast-枠組み:22.1.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 網状組織 stack (Cronet)com.google.android.gms:play-services-cronet:18.1.0 |
Phone, Tablet, Android TV, 自動車, Android Go, ChromeOS, Wear OS |
装置-to-装置 interactions (DTDI)com.google.android.gms:play-services-dtdi:16.0.0-beta02 |
Phone, Tablet, Android Go |
急速な/放蕩な IDentity Online (FIDO) Authenticationcom.google.android.gms:play-services-fido:21.2.0 |
Phone, Tablet, Android TV, 自動車, Android Go, ChromeOS, Wear OS Supported on 装置s that run Android 7.0 (API level 24) or higher. |
Google Fit API for Android and 記録,記録的な/記録するing API on 動きやすい (for 使用者 fitness data)com.google.android.gms:play-services-fitness:21.2.0 |
Phone, Tablet, Android Go, ChromeOS, Wear OS |
Google Play Games Services v2 for Androidcom.google.android.gms:play-services-games-v2:20.1.2 |
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:23.2.0 |
Phone, Tablet, Android TV, Android Go, ChromeOS |
事柄 APIcom.google.android.gms:play-services-home:16.0.0 |
Phone, Tablet |
Google Play Instantcom.google.android.gms:play-services-instantapps:18.1.0 |
Phone, Tablet, Android TV, Android Go, ChromeOS Supported on 装置s that run Android 5.0 (API level 21) or higher. |
場所 Services for Androidcom.google.android.gms:play-services-場所:21.3.0 |
Phone, Tablet, Android TV, 自動車, Android Go, ChromeOS, Wear OS |
Google 地図/計画するs SDK for Androidcom.google.android.gms:play-services-地図/計画するs:19.2.0 |
Phone, Tablet, Android TV, 自動車, Android Go, ChromeOS, Wear OS |
Google 地図/計画するs 3D SDK for Androidcom.google.android.gms:play-services-maps3d:0.0.2 |
Phone, Tablet |
ML 道具 barcode scanningcom.google.android.gms:play-services-mlkit-barcode-scanning:18.3.1 |
Phone, Tablet, Android Go, ChromeOS |
ML 道具 文書 scannercom.google.android.gms:play-services-mlkit-文書-scanner:16.0.0-beta1 |
Phone, Tablet, Android Go, ChromeOS |
ML 道具 直面する (犯罪,病気などの)発見com.google.android.gms:play-services-mlkit-直面する-(犯罪,病気などの)発見:17.1.0 |
Phone, Tablet, Android Go, ChromeOS |
ML 道具 image labelingcom.google.android.gms:play-services-mlkit-image-labeling:16.0.8 |
Phone, Tablet, Android Go, ChromeOS |
ML 道具 image labeling customcom.google.android.gms:play-services-mlkit-image-labeling-custom:16.0.0-beta5 |
Phone, Tablet, Android Go, ChromeOS |
ML 道具 language 身元確認,身分証明com.google.android.gms:play-services-mlkit-language-id:17.0.0 |
Phone, Tablet, Android Go, ChromeOS |
ML 道具 smart replycom.google.android.gms:play-services-mlkit-smart-reply:16.0.0-beta1 |
Phone, Tablet, Android Go, ChromeOS |
ML 道具 支配する segmentationcom.google.android.gms:play-services-mlkit-支配する-segmentation:16.0.0-beta1 |
Phone, Tablet, Android Go, ChromeOS |
ML 道具 text 承認com.google.android.gms:play-services-mlkit-text-承認:19.0.1 |
Phone, Tablet, Android Go, ChromeOS |
ML 道具 text 承認 for Chinesecom.google.android.gms:play-services-mlkit-text-承認-chinese:16.0.1 |
Phone, Tablet, Android Go, ChromeOS |
ML 道具 text 承認 for Devanagaricom.google.android.gms:play-services-mlkit-text-承認-devanagari:16.0.1 |
Phone, Tablet, Android Go, ChromeOS |
ML 道具 text 承認 for Japanesecom.google.android.gms:play-services-mlkit-text-承認-japanese:16.0.1 |
Phone, Tablet, Android Go, ChromeOS |
ML 道具 text 承認 for Koreancom.google.android.gms:play-services-mlkit-text-承認-korean:16.0.1 |
Phone, Tablet, Android Go, ChromeOS |
Nearby 装置 発見 and 関係com.google.android.gms:play-services-nearby:19.3.0 |
Phone, Tablet, Android TV, 自動車, Android Go |
Show open-source licensescom.google.android.gms:play-services-oss-licenses:17.1.0 |
Phone, Tablet, Android TV, 自動車, Android Go, ChromeOS Supported on 装置s that run Android 5.0 (API level 21) or higher. |
Programmatic 接近 Libraries (PAL)com.google.android.gms:play-services-pal:22.0.0 |
Phone, Tablet, Android TV Supported on 装置s that run Android 5.0 (API level 21) or higher. |
審査する lock 質 check com.google.android.gms:play-services-password-複雑さ:18.1.0 |
Phone, Tablet, Android Go, ChromeOS, Wear OS Supported on 装置s that run Android 4.4 (API level 19) to Android 9 (API level 28). |
Google Wallet (以前は Google 支払う/賃金 for Passes)com.google.android.gms:play-services-支払う/賃金:16.5.0 |
Phone, Tablet, Android Go, ChromeOS Supported on 装置s that run Android 5.0 (API level 20) or higher. |
reCAPTCHA 企業 for app instrumentationcom.google.android.gms:play-services-recaptcha:17.1.0 |
Phone, Tablet, Android TV, Android Go, ChromeOS |
SafetyNet APIs (含むs 安全な browsing and 立証する apps)com.google.android.gms:play-services-safetynet:18.1.0 |
Phone, Tablet, Android TV, 自動車, Android Go, ChromeOS |
Google Tag 経営者/支配人com.google.android.gms:play-services-tagmanager:18.3.0 |
Phone, Tablet, Android TV, Android Go, ChromeOS |
仕事s API on Androidcom.google.android.gms:play-services-仕事s:18.3.0 |
Phone, Tablet, Android TV, 自動車, 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 委任する/代表 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 網状組織 APIcom.google.android.gms:play-services-threadnetwork:16.3.0 |
Phone, Tablet |
信用d Time APIcom.google.android.gms:play-services-time:16.0.1 |
Phone, Tablet, 自動車, Android Go, Wear OS |
動きやすい 見通しcom.google.android.gms:play-services-見通し:20.1.3 |
Phone, Tablet, Android Go, ChromeOS |
Google 支払う/賃金 for 支払い(額)s on Androidcom.google.android.gms:play-services-wallet:19.4.0 |
Phone, Tablet, 自動車, Android Go, ChromeOS, Wear OS |
Wearable Data 層 APIcom.google.android.gms:play-services-wearable:19.0.0 |
Phone, Tablet, Wear OS |
Gradle plugins
Google Play services also 含むs several Gradle plugins, as shown in the に引き続いて (米)棚上げする/(英)提議する. 公式文書,認める that the buttons that appear before the previous (米)棚上げする/(英)提議する don't change the (警察などへの)密告,告訴(状) that appears in this (米)棚上げする/(英)提議する.
Use 事例/患者 and Gradle plugin 指名する | Supported 装置s |
---|---|
Show open-source licensescom.google.android.gms:oss-licenses-plugin:0.10.6 |
Phone, Tablet, ChromeOS |
Strict 見解/翻訳/版 checkingcom.google.android.gms:strict-見解/翻訳/版-matcher-plugin:1.2.4 |
Phone, Tablet, Android TV, 自動車, Android Go, ChromeOS, Wear OS |