question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Firestore for database + Chat SDK for chat in my App

See original GitHub issue
  1. Requirement I have a requirement to integrate chat functionality in my android app. This app has firestore backend with several collections like - Users, cities, etc.

  2. What I have done so far User Signup / login : I use firebase for Google login /signup and create user in Firestore database.

    For Chat : I have used following from examples -

public void authenticateWithCurrentFirebaseLogin () {
       Disposable d = ChatSDK.auth().authenticate().subscribe(() -> {
           User currentUser = ChatSDK.currentUser();
           createThread("Test Chat",currentUser);
       }, throwable -> {
           Toast.makeText(this, "Error while authenticating with Chat SDK.",
                   Toast.LENGTH_SHORT).show();
       });
   }

This creates a User in Realtime database and starts a thread that results in opening a chat window. But, I think this is not the right way.

  1. Android Version: 8.0.0

  2. Questions:

How can I correctly execute chat screen between the current logged in user and selected user from list of Users(from firestore)? How do I load previous chat each time I come to the same user again?

Thanks, Kanak

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kanaksonycommented, May 15, 2019

Thanks @bensmiley this worked.

0reactions
bensmileycommented, May 15, 2019

Great!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Structure Firestore (Firebase) For Scalable Chat App
Cloud Firestore is a cloud-hosted, NoSQL database that your iOS, Android, and web apps can access directly via native SDKs. Cloud Firestore ......
Read more >
How to structure firestore for a chat app - Stack Overflow
All the messages are stored in a collection called chats in which each documentID is also found in the groups document. Each document...
Read more >
Firebase Android Codelab - Build Friendly Chat
Welcome to the Friendly Chat codelab. In this codelab, you'll learn how to use the Firebase platform to create a chat app on...
Read more >
Firestore Megachat - Let's Build a Chat App - YouTube
Learn how to build a group chat app with Firestore. It's alive... let's chat on the live demo ...
Read more >
How to build a chatroom app with React and Firebase
In the Firebase console, click the Chat Room project to go to its project overview page; In the navigation menu, click Firestore Database;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found