So i dont have such example or app written. But the needs can be listed to an list what to do.
Your needs:
- A Webserver where some kind of RDC is possible. Java-RDC, a bridge with php, ASP, and so on. But you need one.
- Your app must register his name" at your server. The server then only allows know users to get/send informations (chatmessages)
- User on Client A writes something in a chatroom. The message is send using httputils2 to the Webserver which gets this informaion and store it in a database, textfile, whatever.
- Client A then POLL the server whether there a unread messages or not. Server send unread messages back to app. Client A shows this messages.
- Client B just want to see the CHAT but dont want to write (maybe later ;-)). Client B do only the registration so the server knows B is online.
Client B then POLL the server every minute/few seconds) to check whether there a unread messages or not. Server send unread messages back to Client B. Client B shows this messages.
Server-Script must learn to know WHO IS ONLINE and which chatmessages is send to Client A, B, c. Server must send messages to Online User if a message is not send before to the users...
your only needs in B4A is to know how to handle and work with httputils2-lib and how to get the answer from the server to be handled.
On Server-side you can write the chatserver in that language what you prefer.
I normally use PHP for such things. I use PHP as RDC for the hole Databaseconnection in my Projects BTW ;-)
But it can be written in ASP, Delphi, C++, whatever... It´s YOUR decision