• Stars
    star
    4,590
  • Rank 8,800 (Top 0.2 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created almost 9 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Optimized UI components for Firebase

FirebaseUI for Android — UI Bindings for Firebase

FirebaseOpensource.com Actions Status

FirebaseUI is an open-source library for Android that allows you to quickly connect common UI elements to Firebase APIs.

A compatible FirebaseUI client is also available for iOS.

Table of contents

  1. Usage
  2. Installation
    1. Upgrading
  3. Dependencies
    1. Compatibility
    2. Upgrading dependencies
  4. Sample App
  5. Snapshot Builds
  6. Contributing
    1. Installing
    2. License agreements
    3. Process

Usage

FirebaseUI has separate modules for using Firebase Realtime Database, Cloud Firestore, Firebase Auth, and Cloud Storage. To get started, see the individual instructions for each module:

Installation

FirebaseUI is published as a collection of libraries separated by the Firebase API they target. Each FirebaseUI library has a transitive dependency on the appropriate Firebase SDK so there is no need to include those separately in your app.

In your app/build.gradle file add a dependency on one of the FirebaseUI libraries.

dependencies {
    // FirebaseUI for Firebase Realtime Database
    implementation 'com.firebaseui:firebase-ui-database:8.0.2'

    // FirebaseUI for Cloud Firestore
    implementation 'com.firebaseui:firebase-ui-firestore:8.0.2'

    // FirebaseUI for Firebase Auth
    implementation 'com.firebaseui:firebase-ui-auth:8.0.2'

    // FirebaseUI for Cloud Storage
    implementation 'com.firebaseui:firebase-ui-storage:8.0.2'
}

If you're including the firebase-ui-auth dependency, there's a little more setup required.

After the project is synchronized, we're ready to start using Firebase functionality in our app.

Upgrading

If you are using an old version of FirebaseUI and upgrading, please see the appropriate migration guide:

Dependencies

Compatibility with Firebase / Google Play Services libraries

FirebaseUI libraries have the following transitive dependencies on the Firebase SDK:

firebase-ui-auth
|--- com.google.firebase:firebase-auth
|--- com.google.android.gms:play-services-auth

firebase-ui-database
|--- com.google.firebase:firebase-database

firebase-ui-firestore
|--- com.google.firebase:firebase-firestore

firebase-ui-storage
|--- com.google.firebase:firebase-storage

You can see the specific dependencies associated with each release on the Releases page.

Upgrading dependencies

If you would like to use a newer version of one of FirebaseUI's transitive dependencies, such as Firebase, Play services, or the Android support libraries, you need to add explicit implementation declarations in your build.gradle for all of FirebaseUI's dependencies at the version you want to use. Here are some examples listing all of the critical dependencies:

Auth

implementation "com.google.firebase:firebase-auth:$X.Y.Z"
implementation "com.google.android.gms:play-services-auth:$X.Y.Z"

implementation "androidx.lifecycle:lifecycle-extensions:$X.Y.Z"
implementation "androidx.browser:browser:$X.Y.Z"
implementation "androidx.cardview:cardview:$X.Y.Z"
implementation "androidx.constraintlayout:constraintlayout:$X.Y.Z"
implementation "androidx.legacy:legacy-support-v4:$X.Y.Z"
implementation "com.google.android.material:material:$X.Y.Z"

Firestore

implementation "com.google.firebase:firebase-firestore:$X.Y.Z"

implementation "androidx.legacy:legacy-support-v4:$X.Y.Z"
implementation "androidx.recyclerview:recyclerview:$X.Y.Z"

Realtime Database

implementation "com.google.firebase:firebase-database:$X.Y.Z"

implementation "androidx.legacy:legacy-support-v4:$X.Y.Z"
implementation "androidx.recyclerview:recyclerview:$X.Y.Z"

Storage

implementation "com.google.firebase:firebase-storage:$X.Y.Z"

implementation "androidx.legacy:legacy-support-v4:$X.Y.Z"

Sample app

There is a sample app in the app/ directory that demonstrates most of the features of FirebaseUI. Load the project in Android Studio and run it on your Android device to see a demonstration.

Before you can run the sample app, you must create a project in the Firebase console. Add an Android app to the project, and copy the generated google-services.json file into the app/ directory. Also enable anonymous authentication for the Firebase project, since some components of the sample app requires it.

If you encounter a version incompatibility error between Android Studio and Gradle while trying to run the sample app, try disabling the Instant Run feature of Android Studio. Alternatively, update Android Studio and Gradle to their latest versions.

A note on importing the project using Android Studio: Using 'Project from Version Control' will not automatically link the project with Gradle (issue #1349). When doing so and opening any build.gradle.kts file, an error shows up: Project 'FirebaseUI-Android' isn't linked with Gradle. To resolve this issue, please git checkout the project manually and import with Import from external model.

Snapshot builds

Like to live on the cutting edge? Want to try the next release of FirebaseUI before anyone else? FirebaseUI hosts "snapshot" builds on oss.jfrog.org.

Just add the following to your build.gradle:

repositories {
  maven { url "https://oss.jfrog.org/artifactory/oss-snapshot-local" }
}

Then you can depend on snapshot versions:

implementation 'com.firebaseui:firebase-ui-auth:$X.Y.Z-SNAPSHOT'

You can see which SNAPSHOT builds are avaiable here: https://oss.jfrog.org/webapp/#/artifacts/browse/tree/General/oss-snapshot-local/com/firebaseui

Snapshot builds come with absolutely no guarantees and we will close any issues asking to troubleshoot a snapshot report unless they identify a bug that should block the release launch. Experiment at your own risk!

Contributing

Installing locally

You can download FirebaseUI and install it locally by cloning this repository and running:

./gradlew :library:prepareArtifacts publishToMavenLocal

Contributor License Agreements

We'd love to accept your sample apps and patches! Before we can take them, we have to jump a couple of legal hurdles.

Please fill out either the individual or corporate Contributor License Agreement (CLA).

  • If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an individual CLA.
  • If you work for a company that wants to allow you to contribute your work, then you'll need to sign a corporate CLA.

Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to accept your pull requests.

Contribution process

  1. Submit an issue describing your proposed change to the repo in question.
  2. The repo owner will respond to your issue promptly.
  3. If your proposed change is accepted, and you haven't already done so, sign a Contributor License Agreement (see details above).
  4. Fork the desired repo, develop, and then test your code changes on the latest dev branch.
  5. Ensure that your code adheres to the existing style of the library to which you are contributing.
  6. Ensure that your code has an appropriate set of unit tests which all pass.
  7. Submit a pull request targeting the latest dev branch.

More Repositories

1

functions-samples

Collection of sample apps showcasing popular use cases using Cloud Functions for Firebase
JavaScript
11,952
star
2

quickstart-android

Firebase Quickstart Samples for Android
Java
8,563
star
3

flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
Dart
8,415
star
4

quickstart-js

Firebase Quickstart Samples for Web
HTML
4,818
star
5

firebase-js-sdk

Firebase Javascript SDK
TypeScript
4,720
star
6

firebaseui-web

FirebaseUI is an open-source JavaScript library for Web that provides simple, customizable UI bindings on top of Firebase SDKs to eliminate boilerplate code and promote best practices.
JavaScript
4,465
star
7

firebase-tools

The Firebase Command Line Tools
TypeScript
3,913
star
8

firebase-ios-sdk

Firebase iOS SDK
Objective-C
3,583
star
9

quickstart-ios

Firebase Quickstart Samples for iOS
Swift
2,659
star
10

firebase-android-sdk

Firebase Android SDK
Java
2,165
star
11

codelab-friendlychat-web

The source for the Firebase codelab for building a cross-platform chat app
JavaScript
1,713
star
12

firebase-admin-node

Firebase Admin Node.js SDK
TypeScript
1,571
star
13

FirebaseUI-iOS

iOS UI bindings for Firebase.
Objective-C
1,484
star
14

geofire-js

GeoFire for JavaScript - Realtime location queries with Firebase
TypeScript
1,440
star
15

firebaseui-web-react

React Wrapper for firebaseUI Web
JavaScript
1,246
star
16

superstatic

Superstatic: a static file server for fancy apps.
JavaScript
1,096
star
17

firebase-admin-go

Firebase Admin Go SDK
Go
1,088
star
18

firebase-functions

Firebase SDK for Cloud Functions
TypeScript
1,013
star
19

firebase-admin-python

Firebase Admin Python SDK
Python
958
star
20

quickstart-nodejs

JavaScript
872
star
21

extensions

Source code for official Firebase extensions
TypeScript
871
star
22

quickstart-unity

Firebase Quickstart Samples for Unity
C#
775
star
23

snippets-android

Android snippets for firebase.google.com
Java
748
star
24

snippets-web

Web snippets for firebase.google.com
JavaScript
714
star
25

geofire-java

GeoFire for Java - Realtime location queries with Firebase
Java
671
star
26

firebase-admin-java

Firebase Admin Java SDK
Java
500
star
27

geofire-objc

GeoFire for Objective-C - Realtime location queries with Firebase
Objective-C
440
star
28

friendlyeats-web

JavaScript
405
star
29

snippets-node

Node.js snippets for firebase.google.com
JavaScript
356
star
30

firebase-admin-dotnet

Firebase Admin .NET SDK
C#
350
star
31

quickstart-testing

Samples demonstrating how to test your Firebase app
TypeScript
317
star
32

friendlyeats-android

Cloud Firestore Android codelab
Kotlin
252
star
33

firebase-tools-ui

A local-first UI for Firebase Emulator Suite.
TypeScript
250
star
34

codelab-friendlychat-android

Firebase FriendlyChat codelab
Kotlin
238
star
35

firebase-cpp-sdk

Firebase C++ SDK
C++
230
star
36

quickstart-java

Quickstart samples for Firebase Java Admin SDK
Java
224
star
37

firebase-functions-test

TypeScript
211
star
38

quickstart-cpp

Firebase Quickstart Samples for C++
C++
190
star
39

friendlypix-ios

Friendly Pix iOS is a sample app demonstrating how to build an iOS app with the Firebase Platform.
Swift
166
star
40

fastlane-plugin-firebase_app_distribution

fastlane plugin for Firebase App Distribution. https://firebase.google.com/docs/app-distribution
Ruby
162
star
41

geofire-android

GeoFire for Android apps
Java
131
star
42

firebase-unity-sdk

The Firebase SDK for Unity
C#
128
star
43

friendlyeats-ios

Swift
128
star
44

firebase-functions-python

Python
124
star
45

snippets-ios

iOS snippets used in firebase.google.com
Objective-C
121
star
46

firebaseopensource.com

Source for firebase open source site
TypeScript
118
star
47

quickstart-python

Jupyter Notebook
114
star
48

quickstart-flutter

Dart
107
star
49

codelab-friendlychat-ios

Swift
69
star
50

FirebaseUI-Flutter

Dart
69
star
51

emulators-codelab

JavaScript
44
star
52

snippets-rules

Snippets for security rules on firebase.google.com
TypeScript
43
star
53

oss-bot

Robot friend for open source repositories
TypeScript
36
star
54

firebase-bower

Firebase Web Client
JavaScript
35
star
55

snippets-flutter

Dart
30
star
56

snippets-go

Golang snippets for firebase docs
Go
24
star
57

snippets-java

Java snippets for firebase.google.com
Java
16
star
58

abseil-cpp-SwiftPM

C++
13
star
59

firebase-testlab-instr-lib

Java
13
star
60

snippets-cpp

C++ snippets for firebase.google.com
C++
12
star
61

SpecsStaging

SpecsStaging
11
star
62

SpecsTesting

Ruby
11
star
63

firebase-docs

TypeScript
11
star
64

rtdb-to-csv

JavaScript
11
star
65

appquality-codelab-ios

Firebase iOS App Quality Codelab
Objective-C
11
star
66

genkit

TypeScript
9
star
67

level-up-with-firebase

C#
9
star
68

boringSSL-SwiftPM

C++
8
star
69

firestore-bundle-builder

TypeScript
7
star
70

.github

Default configuration for Firebase repos
6
star
71

nginx

This repo is a PUBLIC FORK
C
6
star
72

SpecsDev

6
star
73

firebase-release-dashboard

JavaScript
5
star
74

snippets-python

Python snippets for firebase.google.com
4
star
75

ok

HTTPS CDN Proxy Healthy Check
4
star
76

grpc-SwiftPM

C++
3
star
77

crashlytics-testapps

Java
2
star
78

.allstar

1
star