// Path: at.attentec.com/android/at.attentec.client/src/com/attentec/AttentecService.java
// public interface ServiceUpdateUIListener {
// 	/** Tell UI to update. */
// 	void updateUI();
// 
// 	/** End UI Activity. */
// 	void endActivity();
// }


import java.io.ByteArrayInputStream;
import java.text.ParseException;
import java.util.Date;
import java.util.Observable;
import java.util.Observer;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ListActivity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.text.InputFilter;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.SimpleCursorAdapter;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;
import com.attentec.AttentecService.ServiceUpdateUIListener;

		});

		statusBarCustomMessageBlock.setOnClickListener(new OnClickListener() {
			public void onClick(final View view) {
				showSetCustomStatus();
			}

		});

		//Setup database
		dbh = new DatabaseAdapter(this);
		dbh.open();

		contactCursor = dbh.getContent(orderMode);

		startManagingCursor(contactCursor);

		//Now create a new list adapter bound to the cursor.
		adapter = createAdapter();

		setListAdapter(adapter);

		ListView contactlist = (ListView) findViewById(android.R.id.list);

		contactlist.setOnItemClickListener(new OnItemClickListener() {
			public void onItemClick(final AdapterView<?> parent, final View v, final int position, final long id) {
				showContact(id);
			}
		});


// Path: at.attentec.com/android/at.attentec.client/src/com/attentec/AttentecService.java
// public interface ServiceUpdateUIListener {
// 	/** Tell UI to update. */
// 	void updateUI();
// 
// 	/** End UI Activity. */
// 	void endActivity();
// }


// Path: at.attentec.com/android/at.attentec.client/src/com/attentec/ContactsActivity.java
import java.io.ByteArrayInputStream;
import java.text.ParseException;
import java.util.Date;
import java.util.Observable;
import java.util.Observer;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ListActivity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.text.InputFilter;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.SimpleCursorAdapter;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;
import com.attentec.AttentecService.ServiceUpdateUIListener;

		});

		statusBarCustomMessageBlock.setOnClickListener(new OnClickListener() {
			public void onClick(final View view) {
				showSetCustomStatus();
			}

		});

		//Setup database
		dbh = new DatabaseAdapter(this);
		dbh.open();

		contactCursor = dbh.getContent(orderMode);

		startManagingCursor(contactCursor);

		//Now create a new list adapter bound to the cursor.
		adapter = createAdapter();

		setListAdapter(adapter);

		ListView contactlist = (ListView) findViewById(android.R.id.list);

		contactlist.setOnItemClickListener(new OnItemClickListener() {
			public void onItemClick(final AdapterView<?> parent, final View v, final int position, final long id) {
				showContact(id);
			}
		});


		AttentecService.setContactsUpdateListener(new ServiceUpdateUIListener() {
