smack 创建账户

 

     ConnectionConfiguration config;
        config = new ConnectionConfiguration(serverName, 5222);
        connection = new XMPPConnection(config);
        connection.connect();
        final AccountManager accountManager = new AccountManager(connection);
        accountManager.createAccount(getUsername(), getPassword());

 

posted @ 2015-08-19 17:16  feimeng0530  阅读(255)  评论(0编辑  收藏  举报