当前位置: 首页 > 软件库 > 手机/移动开发 > >

FirebaseUI-Android

Optimized UI components for Firebase
授权协议 Apache-2.0 License
开发语言 Java
所属分类 手机/移动开发
软件类型 开源软件
地区 不详
投 递 者 黄扬
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

FirebaseUI for Android — UI Bindings for Firebase

Actions Status

FirebaseUI is an open-source library for Android that allows you toquickly 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 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 your app/build.gradle file add a dependency on one of the FirebaseUIlibraries.

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

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

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

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

If you're including the firebase-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-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 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 your build.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 the app/ 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 the app/ directory.Also enable anonymous 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 any build.gradle.kts file, an error shows up:Project 'FirebaseUI-Android' isn't linked with Gradle. To resolve thisissue, 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 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 changes on 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.
  • 我正在使用一个旧的Android项目,该项目主要使用旧的库。要集成Firebase项目,我在firebase依赖项下添加了 implementation 'com.google.firebase:firebase-database:9.4.0' implementation 'com.firebaseui:firebase-ui-database:6.1.0' //this is creating

  • 我正在使用Google Firebase实施身份验证.我收到此错误.如果可能的话,请有人提出解决方案以及解释,以便我理解. Error:Execution failed for task ‘:app:processDebugManifest’. Manifest merger failed : Attribute meta-data#android.support.VERSION@value va

  • 由于这个错误,我无法构建我的项目 错误:com.google.android.gms库:play-services-basement正在[[15.0.1,15.0.1]]的各个其他库请求,但解析为16.0.1。 禁用插件并使用./gradlew:app:dependencies检查依赖关系树。 dependencies { implementation fileTree(dir: 'libs',

  • But it throws me the following error "Failed to resolve: com.google.android.material:material:1.0.0-alpha1" I've tried installing the repository and sync project that Android Studio suggest to no avai

  • 这是我的SearchGetterSetter.java代码:     package com.me.Admin; public class SearchGetterSetter { String fname; public SearchGetterSetter(String fname) { this.fname = fname; } public String getFname(

  • 我想在Android项目中为Android FirebaseUI – Auth编写代码,但是从最近两天开始,我在当前代码中遇到错误,不知道如何修复它.努力但却没有以正确的方式发生. 这是我的build.gradle(项目:FriendlyChat) // Top-level build file where you can add configuration options common to a

  • 从android studio上的android studio运行后,应用只会打开和关闭. 还显示以下警告: 应用gradle文件必须依赖com.google.firebase:firebase-core,Firebase服务才能正常工作. 我尝试从教程制作应用程序,该应用程序已成功编译,但是在Android手机上运行时只能打开和关闭. 的build.gradle apply plugin: 'c

  • 最近我在 Android工作室的应用程序中将我的sdk从25改为26,我在我的所有xml中都遇到了这个奇怪的错误.目前错误并没有以我能看到的任何方式影响我的应用程序,但是每次我必须编辑或更改xml中的某些内容时都很烦人. 这里的错误: 无法实例化以下类 – android.support.v7.widget.AppCompatTextView java.lang.NullPointerExcept

  • 所以我看到 Android Studio的新更新,我更新了. 虽然我不断收到与服务器问题更相关的错误.但这与我的应用无关. 我的一个应用程序有这个错误无法解决’https://jcenter.bintray.com/com/sun/xml/bind/mvn/jaxb-parent/2.2.11/jaxb-parent-2.2.11.pom’.从服务器收到状态码504:网关超时 启用Gradle“离

  • 我开发与利用火力的Android应用程序。而当我想建项目中,我有一个错误: 错误:(39,25)错误:无法访问com.google.android.gms.internal.zzanb zzanb 类文件未找到 该错误是由调用语句引起的:FirebaseAuth.getInstance()。getCurrentUser(); 项目的build.gradle: // Top-level build

  • apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "com.sachintitus.instafy.instafy" minSdkVersion 24 targetSdkVersion 27 versionCode 1 versionName "1

 相关资料
  • FirebaseUi-Angular Compatibility Angular Firebase AngularFire FirebaseUI FirebaseUI-Angular Note 12.1.0 ^9.0.2 ^7.0.4 ^0.600.0 (@next version) 6.0.0-beta.0 Requires firebase v9 support by the official

  • ngx-auth-firebaseui - Open Source Library for Angular Web Apps to integrate a material user interface for firebase authentication. Angular UI component for firebase authentication.This library is an a

  • 我正在尝试使用rollup导入fire baseui库。如果我将firbaseui包含在他们提供的cdn中,用户界面加载良好: 但是,如果我尝试使用导入它,我会在浏览器中遇到以下错误:

  • 我正在尝试制作一个适配器,它将显示给listview实时数据库内容。 带适配器返回null得身份验证: 类: 请求布局:

  • 这是我从Firebase控制台得到的数据。 我试图创建用户UID中的子对象的数据库引用,以便将它们用于回收器适配器。 database reference ref = firebase database . getinstance()。getReference()。儿童(“优惠”)。孩子(???)

  • 我在我的react.js应用程序中安装了Firebase,安装了FirebaseUI,并让Google sign-in正常工作。但是,Google signin按钮上绝对没有应用css样式表。我在https://firebase.google.com/docs/auth/web/firebaseui这里看了文档,并访问了firebaseui.css文件的cdn链接https://cdn . fir