close

以下列出 Google 套件所有的google套件,原始連結在此 (點我):

Table 1. Google Play services dependencies to include in Android apps
Use case and dependency name Supported devices
Google Mobile Ads
com.google.android.gms:play-services-ads:20.2.0
Phone, Tablet
Android Advertising ID (AAID)
com.google.android.gms:play-services-ads-identifier:17.0.1
Phone, Tablet, Android TV, Chrome OS
Lightweight version of Google Mobile Ads
com.google.android.gms:play-services-ads-lite:20.2.0
Phone, Tablet
AdSense for Search (AFS) Custom Search Ads (CSA)
com.google.android.gms:play-services-afs-native:19.0.0
Phone, Tablet, Chrome OS
Google Analytics Services SDK for Android
com.google.android.gms:play-services-analytics:17.0.0
Deprecated. Use Google Analytics for Firebase instead.
Google Sign-In for Android
com.google.android.gms:play-services-auth:19.2.0
Phone, Tablet, Android TV, Auto, Android Go, Chrome OS
SMS Retriever API
com.google.android.gms:play-services-auth-api-phone:17.5.1
Phone, Tablet, Android Go
Google Awareness API
com.google.android.gms:play-services-awareness:18.0.2
Phone, Tablet, Auto, Android Go, Chrome OS
Utility classes
com.google.android.gms:play-services-base:17.6.0
Phone, Tablet, Android TV, Auto, Android Go, Chrome OS, Wear OS
More utility classes
com.google.android.gms:play-services-basement:17.6.0
Phone, Tablet, Android TV, Auto, Android Go, Chrome OS, Wear OS
Google Cast
com.google.android.gms:play-services-cast:20.0.0
Phone, Tablet, Android Go, Chrome OS
Google Cast Application Framework (CAF)
com.google.android.gms:play-services-cast-framework:20.0.0
Phone, Tablet, Android Go, Chrome OS
Chromium network stack (Cronet)
com.google.android.gms:play-services-cronet:17.0.1
Phone, Tablet, Android TV, Auto, Android Go, Chrome OS, Wear OS
Fast IDentity Online (FIDO) Authentication
com.google.android.gms:play-services-fido:19.0.0-beta
Phone, Tablet, Android TV, Auto, Android Go, Chrome OS, Wear OS

Supported on devices that run Android 7.0 (API level 24) or higher.
Google Fit API for Android
com.google.android.gms:play-services-fitness:20.0.0
Phone, Tablet, Android Go, Chrome OS, Wear OS
Google Play Games Services for Android
com.google.android.gms:play-services-games:21.0.0
Phone, Tablet, Android TV, Android Go, Chrome OS
Google Play Instant
com.google.android.gms:play-services-instantapps:17.0.1
Phone, Tablet, Android TV, Android Go, Chrome OS

Supported on devices that run Android 5.0 (API level 21) or higher.
Fused Location Provider for Android (includes activity recognition and geofencing)
com.google.android.gms:play-services-location:18.0.0
Phone, Tablet, Android TV, Auto, Android Go, Chrome OS, Wear OS
Google Maps SDK for Android
com.google.android.gms:play-services-maps:17.0.1
Phone, Tablet, Android TV, Auto, Android Go, Chrome OS, Wear OS
ML Kit barcode scanning
com.google.android.gms:play-services-mlkit-barcode-scanning:16.1.4
Phone, Tablet, Android Go, Chrome OS
ML Kit face detection
com.google.android.gms:play-services-mlkit-face-detection:16.1.3
Phone, Tablet, Android Go, Chrome OS
ML Kit image labeling
com.google.android.gms:play-services-mlkit-image-labeling:16.0.2
Phone, Tablet, Android Go, Chrome OS
ML Kit text recognition
com.google.android.gms:play-services-mlkit-text-recognition:16.1.3
Phone, Tablet, Android Go, Chrome OS
Nearby device discovery and connection
com.google.android.gms:play-services-nearby:18.0.0
Phone, Tablet, Android TV, Auto, Android Go
Show open-source licenses
com.google.android.gms:play-services-oss-licenses:17.0.0
Phone, Tablet, Android TV, Auto, Android Go, Chrome OS
Supported on devices that run Android 5.0 (API level 21) or higher.
Screen lock quality check
com.google.android.gms:play-services-password-complexity:17.0.1
Phone, Tablet, Android Go, Chrome OS, Wear OS

Supported on devices that run Android 4.4 (API level 19) to Android 9 (API level 28).
Google Pay for Passes
com.google.android.gms:play-service-pay:16.0.0
Phone, Tablet, Android Go, Chrome OS

Supported on devices that run Android 5.0 (API level 20) or higher.
reCAPTCHA Enterprise for app instrumentation
com.google.android.gms:play-services-recaptcha:16.0.1
Phone, Tablet, Android TV, Android Go, Chrome OS
SafetyNet APIs (includes device attestation, safe browsing, reCAPTCHA, and app verification)
com.google.android.gms:play-services-safetynet:17.0.1
Phone, Tablet, Android TV, Auto, Android Go, Chrome OS
Google Tag Manager
com.google.android.gms:play-services-tagmanager:17.0.0
Phone, Tablet, Android TV, Android Go, Chrome OS
Tasks API on Android
com.google.android.gms:play-services-tasks:17.2.1
Phone, Tablet, Android TV, Auto, Android Go, Chrome OS, Wear OS
Mobile Vision
com.google.android.gms:play-services-vision:20.1.3
Phone, Tablet, Android Go, Chrome OS
Google Pay for Payments on Android
com.google.android.gms:play-services-wallet:18.1.3
Phone, Tablet, Auto, Android Go, Chrome OS, Wear OS
Wearable Data Layer API
com.google.android.gms:play-services-wearable:17.1.0
Phone, Tablet, Wear OS

 

 怎麼使用這些套件呢,我舉一個例子,像我要 import

com.google.android.gms.security.ProviderInstaller

 

我直接google這個library,然後得到下圖頁面:

1.jpg

 

可以看到左邊的大類,basement類別,就是主要需要implement在 gradle的library,如下範例:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
    implementation 'com.kkbox:openapideveloper:1.0.0'
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'com.koushikdutta.ion:ion:2.2.1'//2.2,1//3.0.8//3.0.1//3.1.0
    implementation 'com.google.code.gson:gson:2.8.0'//2.8.0 //2.8.7
    implementation 'com.google.android.gms:play-services-basement:17.3.0'
}

 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 葛瑞斯肯 的頭像
    葛瑞斯肯

    葛瑞斯肯樂活筆記

    葛瑞斯肯 發表在 痞客邦 留言(0) 人氣()