powered by Jive Software

Asmack creating account code

hi every one hope you having a nice day,

i did not really like to take your time for my problem, but after 1 week of searching about registration code of Asmack, i ended up with try/fail on the clues,because there is extacly non simple of that on net, here is my code:

`public class Registration extends IQ {

public static final String HOST = “”;
public static final int PORT = 9090;
public static final String SERVICE = “what is this?!”;
public static final String USERNAME = “reza”;
public static final String PASSWORD = “mypassword”;

XMPPConnection connection;

public void create() {

ConnectionConfiguration connConfig =
        new ConnectionConfiguration(HOST,PORT, SERVICE);
 connection = new XMPPConnection(connConfig);


AccountManager am = new AccountManager(connection);

Map<String, String> mp = new HashMap<String, String>();

// adding or set elements in Map by put method key and value
// pair
mp.put(“username”, USERNAME);
mp.put(“password”, PASSWORD);

// am.createAccount(mConfig.userName, mConfig.password);
am.createAccount(USERNAME, PASSWORD, mp);

public CharSequence getChildElementXML() {
// TODO Auto-generated method stub
return null;


but it returns error in codding can not instantiate the type XMPPConnection and the constructor AccountManager is not visible, can you help me with the code, and also i have questions what is service in the connection configuration and what is the CharSequence getChildElementXML() for? thanks alot, if you could lead me to an android smack definitive guide, that would best best thing some one did for me in past 20years , also this could be a guide for any one else who searching to learn like me