I am trying to send a chat using Smack. Here is the code
Chat chat = connection.getChatManager().createChat("2@coolcast.com", this);
Message _msg = new Message();
_msg.setBody("Hello this is a test message");
chat.sendMessage(_msg);
This message shows up at the recipient's end with type = "chat". How can I change this message type to a custom string e.g. "my_custom_string"?
I tried this but it is easy to see why the following won't work
Message.Type _type = Message.Type.fromString("my_custom_string");
_msg.setType(_type);