Android Question can webbrowser used as a chatbox ?

PassionDEV

Active Member
Licensed User
i am planing to do a chatbox like whatsapp that supports animated gifs and some html tags

but also i am looking for a way to do it without lagging that can be caused by webbrowser

the html of chat box will load a style css in the header.

and i dont want to load that css each time message arrived

is there a way to set webbrowser header with a style file from local folder and append html tags without reloading ?
 

MarkusR

Well-Known Member
Licensed User
you can add/replace html page parts by id or class name via javascript & jquery.
css should be a separate file(s).
 
Last edited:

PassionDEV

Active Member
Licensed User
I can use append using Javascript hmmm this is an idea

I was looking for built in way from webbrowser directly
 

KZero

Active Member
Licensed User
you can but it will be bit heavier and laggy, use custom listview instead
 

Brandsum

Well-Known Member
Licensed User
you can use a html template having an div with a specific id that will contain chat messages.

Now you can use any websocket library like mqtt, socket.io, websocket etc to get real-time data.

So when you get any new message you can add that message using JavaScript append function.
 
Top