powered by Jive Software

Can I send a message with an image by smack? How to?


I am new to smack. I am wondering can I send a message with image by smack api?

I found JEP-0008, but it seems that it had been deferred, is there any replacement for it?

Any help would highly appreciated.

Embedding it into an xhtml message using the data-protocol is one option.

Hi anlumo,

thanks for your reply. Could you please give me more detail about how to achieve it with Smack? Is this a standard way to do it?


Message was edited by: norwaywoods

Here’'s the spec for this extension to XHTML:


You have to call addExtension() on your message packet, adding an XHTMLExtension object that contains a minimal XHTML message containing this image-tag according to the RFC I referenced above.

This way might not be the best if you’'re interested in anything else than displaying this image on the receiving end (using a regular HTML renderer).


thanks for the detail, I’'ll look into it.