// Path: at.attentec.com/android/at.attentec.client/src/com/attentec/Login.java
// public static class LoginException extends Exception {
// 	/**
// 	 *
// 	 */
// 	private static final long serialVersionUID = 1L;
// 
// 	/**
// 	 * No message constructor.
// 	 */
// 	public LoginException() {
// 
// 	}
// 
// 	/**
// 	 * Message constructor.
// 	 * @param description	description of exception
// 	 */
// 	public LoginException(final String description) {
// 		super(description);
// 	}
// }


import java.util.ArrayList;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Observable;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;
import com.attentec.Login.LoginException;
		// save the status in preferences
		sp.edit().putString(STATUS_CUSTOM_MESSAGE, mCustomMessage).putInt(STATUS, mStatus).commit();

		//Sent to server
		return sendToServer(sp, ctx);
	}

	/**
	 * Send status to server.
	 * @param sp Shared Preferences where username and phonekey are stored.
	 * @param ctx calling context
	 * @return true on success
	 */
	public final boolean sendToServer(final SharedPreferences sp, final Context ctx) {
		//Save to server.
		//get logindata for server contact
		String username = sp.getString("username", "");
		String phoneKey = sp.getString("phone_key", "");
		Hashtable<String, List<NameValuePair>> postdata = ServerContact.getLogin(username, phoneKey);

		//add location to POST data
		List<NameValuePair> statusData = new ArrayList<NameValuePair>();
		statusData.add(new BasicNameValuePair("status", this.getStatusAsString()));
		statusData.add(new BasicNameValuePair("status_custom_message", this.mCustomMessage));
		postdata.put("status", statusData);

		//send location to server
		String url = "/app/app_update_user_info.json";
		try {
			ServerContact.postJSON(postdata, url, ctx);
// Path: at.attentec.com/android/at.attentec.client/src/com/attentec/Login.java
// public static class LoginException extends Exception {
// 	/**
// 	 *
// 	 */
// 	private static final long serialVersionUID = 1L;
// 
// 	/**
// 	 * No message constructor.
// 	 */
// 	public LoginException() {
// 
// 	}
// 
// 	/**
// 	 * Message constructor.
// 	 * @param description	description of exception
// 	 */
// 	public LoginException(final String description) {
// 		super(description);
// 	}
// }


// Path: at.attentec.com/android/at.attentec.client/src/com/attentec/Status.java
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Observable;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;
import com.attentec.Login.LoginException;

		// save the status in preferences
		sp.edit().putString(STATUS_CUSTOM_MESSAGE, mCustomMessage).putInt(STATUS, mStatus).commit();

		//Sent to server
		return sendToServer(sp, ctx);
	}

	/**
	 * Send status to server.
	 * @param sp Shared Preferences where username and phonekey are stored.
	 * @param ctx calling context
	 * @return true on success
	 */
	public final boolean sendToServer(final SharedPreferences sp, final Context ctx) {
		//Save to server.
		//get logindata for server contact
		String username = sp.getString("username", "");
		String phoneKey = sp.getString("phone_key", "");
		Hashtable<String, List<NameValuePair>> postdata = ServerContact.getLogin(username, phoneKey);

		//add location to POST data
		List<NameValuePair> statusData = new ArrayList<NameValuePair>();
		statusData.add(new BasicNameValuePair("status", this.getStatusAsString()));
		statusData.add(new BasicNameValuePair("status_custom_message", this.mCustomMessage));
		postdata.put("status", statusData);

		//send location to server
		String url = "/app/app_update_user_info.json";
		try {
			ServerContact.postJSON(postdata, url, ctx);
		} catch (LoginException e) {