B4J Question [ABMaterial] ABMChat one to one

mindful

Active Member
Licensed User
I just saw this thread better late than never ... the answer to your question is Yes I use ABMChat for group chat and also one to one chat.
 
Upvote 0

amminf

Active Member
Licensed User
Longtime User
"better late than never"

I was testing the chat demo and only saw that it was between several users. I also tried the Erel Chat and I felt the same.

Where is my error? What is the key that I do not see?
 
Upvote 0

mindful

Active Member
Licensed User
There is no error ... those are examples and indeed they resemble a chat room ... for one to one or multiple groups you need to code it yourself.
 
Upvote 0

amminf

Active Member
Licensed User
Longtime User
Ummm, then it is NOT possible in ABMChat as it currently exists, unless it is recoded
 
Upvote 0

mindful

Active Member
Licensed User
ABMChat is a component. So it can be used to code a chat system for one to one chat. The Chat project from within the ABMaterial library is example how the component works. So if you need one to one chat then you need to code it yourself, but ABMChat component can be used to achive this
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Hi @mindful , do you mind to share some insights about how you achieved the one on one chat? I intend to do something that will store, retrieve and load the chats for two of my apps for both group chats and one on one chats. If its ok with you to perhaps just share your piece of code of how?

Thanks.
 
Upvote 0

mindful

Active Member
Licensed User
This is not a matter of just a piece of code .. you have to think your system and design it the way you need it to run ...

As you know the abmchat is only the gui for the solution ... so you need to control the functionality of creating one to one .... search online for a simple chat system db schema .. start small and build more from there.

I currently do not use the chat that I've build but i've spent more than 1 month putting it toghether and i've learned very much insight of abmaterial finishing it so it's not so simple to share ... but i am happy to help you with this if you present how you see it working ....

Here are some tips on how I started:
1. Develop some kind of publish/subscribe mechanism
2. Create a map or more that will help yoh link subscribers to channels and channels to subscribers
3. Create a map that will link the subscribers to the websocket object and be sure to clear that websocket from the map in the websocket_disconnect event
3. All conversations (and group ones) are channels
4. Each participant to a conversation is a subscriber to that channel

Be careful that when abmchat contains many messages it will work slow on mobile devices so it is better to have a limit on how many messages you should load (I check if there are more than X messages and if they are I will group them by the day they were sent and only load the last day and provide an option/context menu that one could use to load more days ..)
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Thanks for the pointers, appreciate it. Let me work on the plan and refer back to you and the forum. Yes, the UI part I understand, it's the workings of the ABM ChatShared module that I wanted to understand especially the fact that its hard coded to link to the chatpage. So I got confused in terms of, let's say I have 4 defined channels, so I need to have 4 ChatShared instance classes to refer to each page in those sections that link to a specific page?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…