Which dependencies to use between Firebase and Google Play Services?

折月煮酒 提交于 2019-12-23 09:38:04

问题


I recently started playing with Firebase, but I cannot completely understand its relation with Google Play Services. I know that Firebase is a mobile platform, and on Android it is based on Google Play Services, but why there are some modules with the same name of the ones of Google Play Services?

For example, in my build.gradle I can have:

com.google.android.gms:play-services-auth:9.4.0
com.google.android.gms:play-services-ads:9.4.0

but also:

com.google.firebase:firebase-auth:9.4.0
com.google.firebase:firebase-ads:9.4.0

I see that on Firebase documentation there is the list of available components (and note that the last one is actually a Google Play Services module):

com.google.android.gms:play-services-appindexing:9.4.0

The same list for Google Play Services is much longer, so some modules are not available using only Firebase dependencies. Which dependencies should I use and why? Can I use mixed dependencies?


回答1:


On this new Firebase (from May 18th), Google added a few existing services to it. Google Play Services already had features like: Analytics, AdMob, Test Lab, etc. And you could use them from your Google Developer Console.

But then, they decided to merge some of those features with firebase. This way, you can have all of the features "together" on your Firebase Console. They are now unified to give your users a better experience and to help you (as a developer) easily manage your project.

So, if you want to use firebase, you should use the firebase dependencies. The Google play dependencies are meant for projects created on the Google Developer Console.



来源:https://stackoverflow.com/questions/38688264/which-dependencies-to-use-between-firebase-and-google-play-services

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!