JoRouss
JoRouss

Reputation: 2884

Firebase + OneSignal What dependencies do I need?

I'm building an app in Android Studio.

I integreted OneSignal successfully using these dependencies:

compile 'com.onesignal:OneSignal:2.+@aar'
compile 'com.google.android.gms:play-services-gcm:+'
compile 'com.google.android.gms:play-services-analytics:+'
compile "com.google.android.gms:play-services-location:+"

Now I'm trying to integrate Firebase Analytics to my application. I now have all these dependencies:

compile 'com.onesignal:OneSignal:2.+@aar'
compile 'com.google.android.gms:play-services-gcm:9.0.1'
compile 'com.google.android.gms:play-services-location:9.0.1'
compile 'com.google.android.gms:play-services-analytics:9.0.1'
compile 'com.google.firebase:firebase-core:9.0.1'

I'm not familiar with the gradle and dependency stuff. I think I red somewhere that the Firebase dependency included the analytic stuff.

Do I really need all these dependecies, or are there some duplicates/useless?

OneSignal SDK integration guide

Firebase SDK integration guide

In this Firebase Analytics integration guide, they also use this dependency:

compile 'com.google.firebase:firebase-analytics:9.0.0'

Which is confusing me right now, because the SDK integration guide doesn't even list it in the Available libraries list

Can anyone clarify this?

Upvotes: 1

Views: 815

Answers (1)

Mounir Elfassi
Mounir Elfassi

Reputation: 2252

No they are not duplicate because OneSignal analytics can't use Firebase analytics

To use OneSignal you need to keep:

compile 'com.google.android.gms:play-services-analytics:9.0.1'

If you need also Firebase analytics, you don't need to add that line:

compile 'com.google.firebase:firebase-analytics:9.0.0'

Please let me know if you need more clarification

Upvotes: 1

Related Questions