简体   繁体   English

设置 Firebase Android 聊天

[英]Setting up Firebase Android chat

I want to create a chat room using Android Studio and Firebase, I noticed that Firebase, provided an example project into GitHub website.我想使用 Android Studio 和 Firebase 创建一个聊天室,我注意到 Firebase 在 GitHub 网站中提供了一个示例项目

I read that I have only to change the string with the correct database name.我读到我只需要使用正确的数据库名称更改字符串。 I receive a toast message that is "Connected" to Firebase server, but I can't see any messages.我收到一条“已连接”到 Firebase 服务器的 Toast 消息,但我看不到任何消息。

Is there something missing?有什么遗漏吗?

The project that you have downloaded is the starter project for the codelabs to work with, you should do along with that tutorial to achieve the application to work, Otherwise you can download the finished project from this github repository, firebase chat您下载的项目是用于codelabs的入门项目,您应该按照该教程来实现应用程序的工作,否则您可以从这个github存储库下载完成的项目, firebase chat

In this repository, import the android project below android start and change all the package names , copy the googleservices.json that you will get by creating new project in your firebase account, and also change the url which you will find inside project with firebase url.在此存储库中,导入 android start 下面的 android 项目并更改所有包名称,复制通过在您的 firebase 帐户中创建新项目将获得的 googleservices.json,并更改您将在项目中找到的带有 firebase url 的 url . Then it will work succesfully :) Firebase Registration然后它将成功运行:) Firebase 注册

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM