0

What is the difference between

compile 'com.google.firebase:firebase-database:11.2.2'

And

compile 'com.firebaseui:firebase-ui-database:2.3.0'

Why do you need one or both?

Grimthorr
  • 6,856
  • 5
  • 41
  • 53
Roga Men
  • 512
  • 6
  • 16

2 Answers2

3

These are 2 separate libraries:

  • com.google.firebase:firebase-database is the official Firebase Database SDK which provides access to the Firebase Realtime Database
  • com.firebaseui:firebase-ui-database is the FirebaseUI Database library which provides UI bindings to be used in conjunction with the above library

The official Firebase SDK libraries provide the required functions for developing with Firebase.

Whereas FirebaseUI libraries make it simple to bind Firebase features to your app's UI. Therefore, you only need to include FirebaseUI libraries if you intend to use the additional functionality provided by them.

Grimthorr
  • 6,856
  • 5
  • 41
  • 53
  • 1
    Also see: https://stackoverflow.com/questions/38799365/firebaseui-and-firebase-what-is-the-difference, which I'm tempted to close this question against. – Frank van Puffelen Nov 08 '17 at 12:08
1
compile com.google.firebase:firebase-database:'version' 

is the dependency for Firebase Realtime Database

compile com.firebaseui:firebase-ui-database:'version'

is the dependency for FirebaseUI ( an open-source library for Android that allows you to quickly connect common UI elements to Firebase API).

You don't need to add FirebaseUI if you don't want to use the UI Bindings for Firebase it offers

PS: if you have update gradle to 3.0.0, please use implementation instead of compile for dependecies

Ahmed Abidi
  • 1,047
  • 12
  • 24