Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Optimized UI components for Firebase

License

NotificationsYou must be signed in to change notification settings

firebase/FirebaseUI-Android

FirebaseOpensource.comActions Status

FirebaseUI is an open-source library for Android that allows you toquickly connect common UI elements toFirebase APIs.

A compatible FirebaseUI client is also available foriOS.

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 theFirebase API they target. Each FirebaseUI library has a transitivedependency on the appropriate Firebase SDK so there is no need to includethose separately in your app.

In yourapp/build.gradle file add a dependency on one of the FirebaseUIlibraries.

dependencies {// FirebaseUI for Firebase Realtime Database    implementation'com.firebaseui:firebase-ui-database:9.0.0'// FirebaseUI for Cloud Firestore    implementation'com.firebaseui:firebase-ui-firestore:9.0.0'// FirebaseUI for Firebase Auth    implementation'com.firebaseui:firebase-ui-auth:9.0.0'// FirebaseUI for Cloud Storage    implementation'com.firebaseui:firebase-ui-storage:9.0.0'}

If you're including thefirebase-ui-auth dependency, there's a littlemore 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 appropriatemigration 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-authfirebase-ui-database|--- com.google.firebase:firebase-databasefirebase-ui-firestore|--- com.google.firebase:firebase-firestorefirebase-ui-storage|--- com.google.firebase:firebase-storage

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

Upgrading dependencies

If you would like to use a newer version of one of FirebaseUI's transitive dependencies, suchas Firebase, Play services, or the Android support libraries, you need to add explicitimplementation declarations in yourbuild.gradle for all of FirebaseUI's dependencies at the versionyou 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 theapp/ directory that demonstrates mostof the features of FirebaseUI. Load the project in Android Studio andrun it on your Android device to see a demonstration.

Before you can run the sample app, you must create a project inthe Firebase console. Add an Android app to the project, and copythe generated google-services.json file into theapp/ directory.Also enableanonymous authenticationfor the Firebase project, since some components of the sample apprequires it.

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

A note on importing the project using Android Studio: Using 'Project fromVersion Control' will not automatically link the project with Gradle(issue#1349).When doing so and opening anybuild.gradle.kts file, an error shows up:Project 'FirebaseUI-Android' isn't linked with Gradle. To resolve thisissue, pleasegit checkout the project manually and import withImport 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 yourbuild.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 whichSNAPSHOT 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 troubleshoota snapshot report unless they identify a bug that should block the release launch. Experimentat your own risk!

Contributing

Installing locally

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

./gradlew :library:prepareArtifacts publishToMavenLocal

Contributor License Agreements

We'd love to accept your sample apps and patches! Before we can take them, wehave 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 youown the intellectual property, then you'll need to sign anindividual CLA.
  • If you work for a company that wants to allow you to contribute your work,then you'll need to sign acorporate CLA.

Follow either of the two links above to access the appropriate CLA andinstructions for how to sign and return it. Once we receive it, we'll be able toaccept 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 aContributor License Agreement (see details above).
  4. Fork the desired repo, develop, and then test your code changeson the latest dev branch.
  5. Ensure that your code adheres to the existing style of the library to whichyou 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.

Packages

No packages published

Contributors95

Languages


[8]ページ先頭

©2009-2025 Movatter.jp