-
Notifications
You must be signed in to change notification settings - Fork 92
How to use or integrate this library with fire-base real time database #52
Comments
Hi @prashantpimpale93 , I have no experience using Firebase, but as long as you can implement your logic inside your ChatAdapter, you should manage to get the chat working as per your requirements. On the NodeJS demo I have setup, you can check the message being broadcast to other users with Socket.IO. I believe you have to find a similar way of broadcasting your messages by using Firebase. Have a look at this and see if it is of any help: https://firebase.google.com/docs/cloud-messaging/android/send-multiple Cheers! |
Thanks for reply @rpaschoal. I have created one adapter (demo-adapter) in that I am writing my logic or firebase queries. But I want to modify that method which gets called on user click. I checked but need your help! |
Currently, I have developed the whole chat module with the help of Angular Material design and chat app and firebase queries are working fine on production but for UI this one is quite good and which I loved most. |
Can I use only HTML (UI part) of this library? |
@prashantpimpale93 What would you like to do when a user gets clicked? Perhaps we can start creating events that you could potentially bind into this module. |
@prashantpimpale93 This is a very good idea, could you please suggest a couple of events you would like to bind to? EG: OnChatWindowOpened We can elaborate a few and I will implement them for a next release 👍 |
Yes.
|
Here is the contributing guide: https://github.com/rpaschoal/ng-chat/blob/master/CONTRIBUTING.md |
Yes. Will look at getMessageHistory() Method |
For the second point: |
Ohh sorry I didn't see that shared link. Will check it out |
@rpaschoal Expect more detailed information to contribute.
|
@prashantpimpale93 Just had a look at your fork, your clone URL is: https://github.com/prashantpimpale93/ng-chat.git |
Got that! I was trying with userName and then repo URL. Successfully cloned. |
@rpaschoal can u please suggest which dependencies are required to run the project? Ex. Angular version and other third-party dependencies etc. It would better for me if you list down the commands |
All changes must go to the SRC directory, that is the core of the module. You should have everything you need from NPM dependency wise. If you're not comfortable with doing the change, I can do it. Just list your main ideas here and I will work them out as soon as I have a spare time. I can then show you the pull request with the changes so you can grasp the idea around developing for this package. If you have the code snippet for the browser notification, post it here as well, that will save me some time while adding everything to the main module :) |
@rpaschoal Yes exaclty!
Here is the code snippet:
Notification trigger code:
The above code will reside in your Will expect some help from you on point no 1! 🎉 |
@prashantpimpale93 I've started working on the browser notifications. I will be releasing version Have a look at the following commit to see how I usually add features to this chat module: Bits of code blocks here and there, test the package with the demo project via NPM link and then after it is all working sweet I just add unit tests around the new feature. You asked earlier in this thread about using the HTML part of this project. I suggest that we develop all new features here. By doing this, a lot of people will get new features for the package and it will grow both in code base and adoption from the community. |
@rpaschoal I am stuck at one problem. I have asked one question in StackOverflow Here is the link to the question - https://stackoverflow.com/questions/50654263/unable-to-bind-data-to-the-list Please look once n get back to me if you're familiar with this. |
@prashantpimpale93 I think there is something wrong with the link you've posted. Version Have a look at the events that will be exposed in the new version: Events(onUserChatClicked): Event emitted every time a user is clicked on the chat window and a new chat window is opened. What do you think? Will these fulfill the requirements of your implementation? The By the way, I am keeping the pull request open for you to have a look on how I've implemented the code: #53 Cheers! |
Hmm, looking at this event list, I might refactor the name of the first event to |
Thanks a lot!!! The problem is the method getmessagehistory() returns an
observable of message in that method I m calling my firebase api which is
aync call hence the control is already gets returned before firebase data
load.
…On 4 Jun 2018 9:45 a.m., "Rafael Carvalho" ***@***.***> wrote:
Hmm, looking at this event list, I might refactor the name of the first
event to onUserClicked
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Akdz9HQyZVtvfIcYgcmc2OVadTx7xT7-ks5t5LRPgaJpZM4UMNZq>
.
|
@prashantpimpale93 Can't you just return an Observable from your Firebase call? Just wrap it inside an Observable. |
Yes. I have tried out that also but some configuration or due to
dependencies that is not working. Do you have any friend who has worked on
firebase?
Thanks & Regards,
Prashant Pimpale
"This e-mail and any attached documents may contain confidential or
proprietary information. If you are not the intended recipient, you are
notified that any dissemination, copying of this e-mail and any attachments
thereto or use of their contents by any means whatsoever is strictly
prohibited. If you have received this e-mail in error, please advise the
sender immediately and delete this e-mail and all attached documents from
your computer system."
…On Mon, Jun 4, 2018 at 12:35 PM, Rafael Carvalho ***@***.***> wrote:
@prashantpimpale93 <https://github.com/prashantpimpale93> Can't you just
return an Observable from your Firebase call? Just wrap it inside an
Observable.
I'll most likely release 1.0.11 tomorrow by the way.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Akdz9G_dSHpQR5Ne3Ia3ZfZwxTh_L15Aks5t5NxOgaJpZM4UMNZq>
.
|
I know a few @prashantpimpale93, but they are busy professionals. If you have a Firebase related question, I would advise you to post it on StackOverflow.
Have a look at the new features that you've suggested. Thank you for the ideas. I am closing this issue as the thread has gone too long and we have deviated from the main issue. If you have any further questions, please open a new issue here in GitHub. Feel encouraged to post your Firebase doubts here too, but if you do, please post your full adapter code so I or someone else can have more information to help you. |
Ok thanks for your help @rpaschoal! |
I am using firebase real-time database for chat feature so how do I integrate this library with firebase.
The text was updated successfully, but these errors were encountered: