Corneliu
Corneliu

Reputation: 1

Android xmpp send message with parameters

I'm new to openfire chat messages. Right now i have a working chat between 2 phones.

I use the followin line to send the message :

Message msgObj = new Message("user"+discover_id + "@" + activity.getResources().getString(R.string.xmpp_server), Message.Type.chat);

How can i add extra info ( user_id, sender_name) to the message?

Thanks,

Upvotes: 0

Views: 222

Answers (1)

Flow
Flow

Reputation: 24043

Use a custom ExtensionsElement and add it to the message. You will also need to implement and register a provider for your custom extension element.

Upvotes: 1

Related Questions