// Path: android/src/com/paphus/sdk/activity/actions/HttpCreateUserAction.java
// public class HttpCreateUserAction extends HttpUIAction {
// 	UserConfig config;
// 
// 	public HttpCreateUserAction(Activity activity, UserConfig config) {
// 		super(activity);
// 		this.config = config;
// 	}
// 
// 	@Override
// 	protected String doInBackground(Void... params) {
// 		try {
// 		this.config = MainActivity.connection.create(this.config);
// 		} catch (Exception exception) {
// 			this.exception = exception;
// 		}
// 		return "";
// 	}
// 
// 	@Override
// 	public void onPostExecute(String xml) {
// 		super.onPostExecute(xml);
// 		if (this.exception != null) {
// 			return;
// 		}
// 		try {
// 			MainActivity.user = this.config;
// 
// 			this.activity.finish();
// 		} catch (Exception error) {
// 			this.exception = error;
// 			MainActivity.error(this.exception.getMessage(), this.exception, this.activity);
// 			return;			
// 		}
//     }
// }
// 
// Path: java/src/com/paphus/sdk/config/UserConfig.java
// public class UserConfig extends Config {
// 	public String password;
// 	public String newPassword;
// 	public String hint;
// 	public String name;
// 	public boolean showName;
// 	public String email;
// 	public String website;
// 	public String bio;
// 	public boolean over18;
// 	public String avatar;
// 	
// 	public String connects;
// 	public String bots;
// 	public String posts;
// 	public String messages;
// 	public String forums;
// 	public String scripts;
// 	public String avatars;
// 	public String domains;
// 	public String channels;
// 	
// 	public String joined;
// 	public String lastConnect;
// 
// 	
// 	public void addCredentials(SDKConnection connection) {
// 		this.application = connection.getCredentials().getApplicationId();
// 		if (connection.getDomain() != null) {
// 			this.domain = connection.getDomain().id;
// 		}
// 	}
// 
// 	public void parseXML(Element element) {
// 		this.user = element.getAttribute("user");
// 		this.name = element.getAttribute("name");
// 		this.showName = Boolean.valueOf(element.getAttribute("showName"));
// 		this.token = element.getAttribute("token");
// 		this.email = element.getAttribute("email");
// 		this.hint = element.getAttribute("hint");
// 		this.website = element.getAttribute("website");
// 		this.connects = element.getAttribute("connects");
// 		this.bots = element.getAttribute("bots");
// 		this.posts = element.getAttribute("posts");
// 		this.messages = element.getAttribute("messages");
// 		this.avatars = element.getAttribute("avatars");
// 		this.scripts = element.getAttribute("scripts");
// 		this.domains = element.getAttribute("domains");
// 		this.joined = element.getAttribute("joined");
// 		this.lastConnect = element.getAttribute("lastConnect");
// 		
// 		Node node = element.getElementsByTagName("bio").item(0);
// 		if (node != null) {
// 			this.bio = node.getTextContent();
// 		}
// 		node = element.getElementsByTagName("avatar").item(0);
// 		if (node != null) {
// 			this.avatar = node.getTextContent();
// 		}
// 	}
// 	
// 	public String toXML() {
// 		StringWriter writer = new StringWriter();
// 		writer.write("<user");
// 		writeCredentials(writer);
// 		if (this.password != null) {
// 			writer.write(" password=\"" + this.password + "\"");
// 		}
// 		if (this.newPassword != null) {
// 			writer.write(" newPassword=\"" + this.newPassword + "\"");
// 		}
// 		if (this.hint != null) {
// 			writer.write(" hint=\"" + this.hint + "\"");
// 		}
// 		if (this.name != null) {
// 			writer.write(" name=\"" + this.name + "\"");
// 		}
// 		if (this.showName) {
// 			writer.write(" showName=\"" + this.showName + "\"");
// 		}
// 		if (this.email != null) {
// 			writer.write(" email=\"" + this.email + "\"");
// 		}
// 		if (this.website != null) {
// 			writer.write(" website=\"" + this.website + "\"");
// 		}
// 		if (this.over18) {
// 			writer.write(" over18=\"" + this.over18 + "\"");
// 		}
// 		writer.write(">");
// 		
// 		if (this.bio != null) {
// 			writer.write("<bio>");
// 			writer.write(this.bio);
// 			writer.write("</bio>");
// 		}
// 		writer.write("</user>");
// 		return writer.toString();
// 	}
// 		
// }


import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.EditText;
import com.paphus.brainbot.R;
import com.paphus.sdk.activity.actions.HttpCreateUserAction;
import com.paphus.sdk.config.UserConfig;
package com.paphus.sdk.activity;



/**
 * Activity for creating a new user.
 */
public class CreateUserActivity extends Activity {
	@Override
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_create_user);		
	}
    
    /**
     * Create the user.
     */
    public void create(View view) {
// Path: android/src/com/paphus/sdk/activity/actions/HttpCreateUserAction.java
// public class HttpCreateUserAction extends HttpUIAction {
// 	UserConfig config;
// 
// 	public HttpCreateUserAction(Activity activity, UserConfig config) {
// 		super(activity);
// 		this.config = config;
// 	}
// 
// 	@Override
// 	protected String doInBackground(Void... params) {
// 		try {
// 		this.config = MainActivity.connection.create(this.config);
// 		} catch (Exception exception) {
// 			this.exception = exception;
// 		}
// 		return "";
// 	}
// 
// 	@Override
// 	public void onPostExecute(String xml) {
// 		super.onPostExecute(xml);
// 		if (this.exception != null) {
// 			return;
// 		}
// 		try {
// 			MainActivity.user = this.config;
// 
// 			this.activity.finish();
// 		} catch (Exception error) {
// 			this.exception = error;
// 			MainActivity.error(this.exception.getMessage(), this.exception, this.activity);
// 			return;			
// 		}
//     }
// }
// 
// Path: java/src/com/paphus/sdk/config/UserConfig.java
// public class UserConfig extends Config {
// 	public String password;
// 	public String newPassword;
// 	public String hint;
// 	public String name;
// 	public boolean showName;
// 	public String email;
// 	public String website;
// 	public String bio;
// 	public boolean over18;
// 	public String avatar;
// 	
// 	public String connects;
// 	public String bots;
// 	public String posts;
// 	public String messages;
// 	public String forums;
// 	public String scripts;
// 	public String avatars;
// 	public String domains;
// 	public String channels;
// 	
// 	public String joined;
// 	public String lastConnect;
// 
// 	
// 	public void addCredentials(SDKConnection connection) {
// 		this.application = connection.getCredentials().getApplicationId();
// 		if (connection.getDomain() != null) {
// 			this.domain = connection.getDomain().id;
// 		}
// 	}
// 
// 	public void parseXML(Element element) {
// 		this.user = element.getAttribute("user");
// 		this.name = element.getAttribute("name");
// 		this.showName = Boolean.valueOf(element.getAttribute("showName"));
// 		this.token = element.getAttribute("token");
// 		this.email = element.getAttribute("email");
// 		this.hint = element.getAttribute("hint");
// 		this.website = element.getAttribute("website");
// 		this.connects = element.getAttribute("connects");
// 		this.bots = element.getAttribute("bots");
// 		this.posts = element.getAttribute("posts");
// 		this.messages = element.getAttribute("messages");
// 		this.avatars = element.getAttribute("avatars");
// 		this.scripts = element.getAttribute("scripts");
// 		this.domains = element.getAttribute("domains");
// 		this.joined = element.getAttribute("joined");
// 		this.lastConnect = element.getAttribute("lastConnect");
// 		
// 		Node node = element.getElementsByTagName("bio").item(0);
// 		if (node != null) {
// 			this.bio = node.getTextContent();
// 		}
// 		node = element.getElementsByTagName("avatar").item(0);
// 		if (node != null) {
// 			this.avatar = node.getTextContent();
// 		}
// 	}
// 	
// 	public String toXML() {
// 		StringWriter writer = new StringWriter();
// 		writer.write("<user");
// 		writeCredentials(writer);
// 		if (this.password != null) {
// 			writer.write(" password=\"" + this.password + "\"");
// 		}
// 		if (this.newPassword != null) {
// 			writer.write(" newPassword=\"" + this.newPassword + "\"");
// 		}
// 		if (this.hint != null) {
// 			writer.write(" hint=\"" + this.hint + "\"");
// 		}
// 		if (this.name != null) {
// 			writer.write(" name=\"" + this.name + "\"");
// 		}
// 		if (this.showName) {
// 			writer.write(" showName=\"" + this.showName + "\"");
// 		}
// 		if (this.email != null) {
// 			writer.write(" email=\"" + this.email + "\"");
// 		}
// 		if (this.website != null) {
// 			writer.write(" website=\"" + this.website + "\"");
// 		}
// 		if (this.over18) {
// 			writer.write(" over18=\"" + this.over18 + "\"");
// 		}
// 		writer.write(">");
// 		
// 		if (this.bio != null) {
// 			writer.write("<bio>");
// 			writer.write(this.bio);
// 			writer.write("</bio>");
// 		}
// 		writer.write("</user>");
// 		return writer.toString();
// 	}
// 		
// }


// Path: android/examples/Brain Bot/src/com/paphus/sdk/activity/CreateUserActivity.java
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.EditText;
import com.paphus.brainbot.R;
import com.paphus.sdk.activity.actions.HttpCreateUserAction;
import com.paphus.sdk.config.UserConfig;

package com.paphus.sdk.activity;



/**
 * Activity for creating a new user.
 */
public class CreateUserActivity extends Activity {
	@Override
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_create_user);		
	}
    
    /**
     * Create the user.
     */
    public void create(View view) {
    	UserConfig config = new UserConfig();