title: How to set custom Message.Type string in Smack?
body: <p>I am trying to send a chat using Smack. Here is the code</p>
  
  <pre><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);
  </code></pre>
  
  <p>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"?</p>
  
  <p>I tried this but it is easy to see why the following won't work</p>
  
  <pre><code>  Message.Type _type = Message.Type.fromString("my_custom_string");
    _msg.setType(_type);
  </code></pre>