Firestore for database + Chat SDK for chat in my App
See original GitHub issue-
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.
-
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.
-
Android Version: 8.0.0
-
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:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @bensmiley this worked.
Great!