ASMACK. Create a new user and add to a specific group

I want to register as new users on the xmpp server (Openfire) through the android client, and all new users must be transferred. I create users, but I'm not sure how to add them to the registry entries to start a conversation. I donโ€™t know if itโ€™s better to create a group and add all the contacts, but I donโ€™t know how to do it.

    try {
        con.connect();

        AccountManager am = con.getAccountManager();

        am.createAccount(USERNAME, PASSWORD);

        Log.i(TAG,"Creation complete");
    }
    catch (XMPPException e) {
        Log.e(TAG,"Error at user creation "+e);
        return false;

    }

Can anyone suggest me how to achieve this ... Any help would be greatly appreciated ... !!!

+3
source share

All Articles