Package org.jivesoftware.smack

Examples of org.jivesoftware.smack.ChatManager


    boolean success = false;
   
    try {
      XMPPConnection conn = XMPPConnect.getConnection();

      ChatManager chatmanager = ChatManager.getInstanceFor(conn);
      Chat newChat = chatmanager.createChat(to, null);

      try {
        while(message.length()>=2000) {
          newChat.sendMessage(message.substring(0, 2000));
          message = message.substring(2000);
View Full Code Here


    try {
      XMPPConnection conn = XMPPConnect.getConnection();

      if (attachmentUrl == null) {
        // send a normal message without an attachment
        ChatManager chatmanager = ChatManager.getInstanceFor(conn);
        Chat newChat = chatmanager.createChat(to, new MessageListener() {
          public void processMessage(Chat chat, Message message) {
            logger.debug("Received message on XMPP: {}", message.getBody());
          }
        });
        try {
View Full Code Here

TOP

Related Classes of org.jivesoftware.smack.ChatManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.