ทรัพยากร Dependency ของ Android SDK ของ Firebase ในบริการ Google Play

Firebase Android SDK บางรายการใช้ Google Play services ซึ่งหมายความว่าจะทํางานบนอุปกรณ์และโปรแกรมจําลองที่ติดตั้ง Google Play services เท่านั้น Firebase SDK เหล่านี้จะสื่อสารกับGoogle Play servicesบริการเบื้องหลังในอุปกรณ์เพื่อให้บริการ API ที่ปลอดภัย ทันสมัย และเบาให้แก่แอปของคุณ อุปกรณ์ Android บางรุ่น เช่น อุปกรณ์ Amazon Kindle Fire หรืออุปกรณ์ที่ขายในบางภูมิภาค จะไม่มีการติดตั้ง Google Play services

Firebase Android SDK ใดบ้างที่ต้องใช้ Google Play services

Firebase SDK แบ่งออกเป็น 3 หมวดหมู่ ได้แก่

  • ต้องมี Play services — SDK เหล่านี้ต้องใช้ Google Play services ไม่เช่นนั้นจะไม่มีฟังก์ชันการทำงาน
  • Play services แนะนํา — SDK เหล่านี้ต้องใช้ Google Play services เพื่อให้มีฟังก์ชันการทํางานอย่างเต็มรูปแบบ แต่ยังคงมีฟังก์ชันการทํางานส่วนใหญ่แม้จะไม่มี Google Play services ก็ตาม
  • Play services ไม่จำเป็น — SDK เหล่านี้ไม่จำเป็นต้องใช้ Google Play services เพื่อให้ฟังก์ชันการทำงานสมบูรณ์

ตารางด้านล่างนี้ถูกต้องสำหรับ SDK แต่ละรายการรุ่นล่าสุดเท่านั้น เวอร์ชันเก่าบางเวอร์ชันอาจมีข้อกำหนดที่เข้มงวดกว่า

Google Play services ไม่จำเป็น

ผลิตภัณฑ์ คลัง Google Play servicesใช่ไหม
App Check ผู้ให้บริการที่กำหนดเองและแก้ไขข้อบกพร่อง com.google.firebase:firebase-appcheck:18.0.0
com.google.firebase:firebase-appcheck-ktx:18.0.0
com.google.firebase:firebase-appcheck-debug:18.0.0
ไม่จำเป็น
App Distribution API com.google.firebase:firebase-appdistribution-api:16.0.0-beta14
com.google.firebase:firebase-appdistribution-api-ktx:16.0.0-beta14
ไม่จำเป็น
App Distribution com.google.firebase:firebase-appdistribution:16.0.0-beta14 ไม่จำเป็น
Authentication com.google.firebase:firebase-auth:23.2.0
com.google.firebase:firebase-auth-ktx:23.2.0
ไม่จำเป็น
Cloud Firestore com.google.firebase:firebase-firestore:25.1.2
com.google.firebase:firebase-firestore-ktx:25.1.2
ไม่จำเป็น
Cloud Functions for Firebase Client SDK com.google.firebase:firebase-functions:21.1.1
com.google.firebase:firebase-functions-ktx:21.1.1
ไม่จำเป็น
Cloud Storage for Firebase com.google.firebase:firebase-storage:21.0.1
com.google.firebase:firebase-storage-ktx:21.0.1
ไม่จำเป็น
Crashlytics com.google.firebase:firebase-crashlytics:19.4.1
com.google.firebase:firebase-crashlytics-ktx:19.4.1
ไม่จำเป็น
In-App Messaging com.google.firebase:firebase-inappmessaging:21.0.1
com.google.firebase:firebase-inappmessaging-ktx:21.0.1
ไม่บังคับ
In-App Messaging จอแสดงผล com.google.firebase:firebase-inappmessaging-display:21.0.1
com.google.firebase:firebase-inappmessaging-display-ktx:21.0.1
ไม่บังคับ
การติดตั้ง Firebase ครั้ง com.google.firebase:firebase-installations:18.0.0
com.google.firebase:firebase-installations-ktx:18.0.0
ไม่จำเป็น
Performance Monitoring com.google.firebase:firebase-perf:21.0.4
com.google.firebase:firebase-perf-ktx:21.0.4
ไม่จำเป็น
Realtime Database com.google.firebase:firebase-database:21.0.0
com.google.firebase:firebase-database-ktx:21.0.0
ไม่จำเป็น
Remote Config com.google.firebase:firebase-config:22.1.0
com.google.firebase:firebase-config-ktx:22.1.0
ไม่จำเป็น
Vertex AI in Firebase com.google.firebase:firebase-vertexai:16.2.0 ไม่จำเป็น
ผลิตภัณฑ์ คลัง Google Play servicesใช่ไหม
AdMob com.google.android.gms:play-services-ads:24.0.0 แนะนำ*
Analytics com.google.firebase:firebase-analytics:22.3.0
com.google.firebase:firebase-analytics-ktx:22.3.0
แนะนำ*
App Check ผู้ให้บริการ Play Integrity com.google.firebase:firebase-appcheck-playintegrity:18.0.0 ต้องระบุ
App Check ผู้ให้บริการ SafetyNet com.google.firebase:firebase-appcheck-safetynet:16.1.2 ต้องระบุ
App Indexing com.google.firebase:firebase-appindexing:20.0.0 ต้องระบุ
Cloud Messaging com.google.firebase:firebase-messaging:24.1.0
com.google.firebase:firebase-messaging-ktx:24.1.0
ต้องระบุ
Dynamic Links com.google.firebase:firebase-dynamic-links:22.1.0
com.google.firebase:firebase-dynamic-links-ktx:22.1.0
ต้องระบุ
Firebase ML วิสัยทัศน์ com.google.firebase:firebase-ml-vision:24.1.0 ต้องระบุ
Firebase ML โมเดลที่กำหนดเอง com.google.firebase:firebase-ml-model-interpreter:22.0.4 ต้องระบุ

* Firebase SDK สําหรับ Google Analytics สามารถส่งเหตุการณ์ในอุปกรณ์ใดก็ได้ แต่ข้อมูลเชิงลึกอัตโนมัติบางอย่าง เช่น ข้อมูลประชากร จะพร้อมใช้งานในอุปกรณ์ที่มี Google Play services เท่านั้น