public interface Constants {

	/** SharedPreferences 文件名 **/
	String SHARED_PREFERENCE_NAME = "client_preferences";

	/********************************** 用户登陆管理 ***************************************************************************************************/

	/** 用户最后登陆时间 **/
	String LAST_TIME = "LAST_TIME";

	/** 一个月内自动登陆 : 60 * 60 * 24 * 30 = 2592000 **/
	long AUTO_LOGIN = 2592000;

	/** 记录上次退出时页面 **/
	String PAGENUMBER = "PAGENUMBER";

	/********************************** 偏好设置 ***************************************************************************************************/

	/** 回调Activity的包名 **/
	String CALLBACK_ACTIVITY_PACKAGE_NAME = "CALLBACK_ACTIVITY_PACKAGE_NAME";

	/** 回调Activity的全类名 **/
	String CALLBACK_ACTIVITY_CLASS_NAME = "CALLBACK_ACTIVITY_CLASS_NAME";

	/** XMPP密钥 **/
	String API_KEY = "API_KEY";

	/** 版本号 **/
	String VERSION = "VERSION";

	/** XMPP的IP **/
	String XMPP_HOST = "XMPP_HOST";

	/** XMPP的端口 **/
	String XMPP_PORT = "XMPP_PORT";

	/** XMPP的用户名 **/
	String XMPP_USERNAME = "XMPP_USERNAME";

	/** XMPP的密码 **/
	String XMPP_PASSWORD = "XMPP_PASSWORD";

	// String USER_KEY = "USER_KEY";

	/** 设备ID(手机*#06#) **/
	String DEVICE_ID = "DEVICE_ID";

	/** 模拟器ID **/
	String EMULATOR_DEVICE_ID = "EMULATOR_DEVICE_ID";

	/** 通知的logo图片 **/
	String NOTIFICATION_ICON = "NOTIFICATION_ICON";

	/** 是否显示推送的通知 **/
	String SETTINGS_NOTIFICATION_ENABLED = "SETTINGS_NOTIFICATION_ENABLED";

	/** 当接到推送通知-->是否播放通知声音 **/
	String SETTINGS_SOUND_ENABLED = "SETTINGS_SOUND_ENABLED";

	/** 当接到推送通知-->是否震动手机 **/
	String SETTINGS_VIBRATE_ENABLED = "SETTINGS_VIBRATE_ENABLED";

	/** 当接到推送通知-->是否显示吐司 **/
	String SETTINGS_TOAST_ENABLED = "SETTINGS_TOAST_ENABLED";

	/********************************** 通知 ***************************************************************************************************/

	/** 通知的ID **/
	String NOTIFICATION_ID = "NOTIFICATION_ID";

	/** 通知的密钥 **/
	String NOTIFICATION_API_KEY = "NOTIFICATION_API_KEY";

	/** 通知的标题 **/
	String NOTIFICATION_TITLE = "NOTIFICATION_TITLE";

	/** 通知的正文 **/
	String NOTIFICATION_MESSAGE = "NOTIFICATION_MESSAGE";

	/** 通知的Url **/
	String NOTIFICATION_URI = "NOTIFICATION_URI";

	/********************************** intent动作 ***************************************************************************************************/

	/** 显示通知 **/
	String ACTION_SHOW_NOTIFICATION = "org.androidpn.client.SHOW_NOTIFICATION";

	/** 通知被点击 **/
	String ACTION_NOTIFICATION_CLICKED = "org.androidpn.client.NOTIFICATION_CLICKED";

	/** 清除通知 **/
	String ACTION_NOTIFICATION_CLEARED = "org.androidpn.client.NOTIFICATION_CLEARED";

}
 public class GlobalParams {

	/** 全局的activity **/
	public static Activity activity = null;

	/**
	 * 代理的ip
	 */
	public static String PROXY_IP = "";
	/**
	 * 代理的端口
	 */
	public static int PROXY_PORT = 0;
	/**
	 * 屏幕宽度
	 */
	public static int WIN_WIDTH = 0;
	/**
	 * 登录的状态
	 */
	public static boolean ISLOGIN = false;
	/**
	 * 用户的余额
	 */
	public static Float MONEY = null;
	/**
	 * 用户名
	 */
	public static String USERNAME = "";
}
 public class FriendRooms {
	/** 聊天室的名称 **/
	private String name;
	/** 聊天室JID **/
	private String jid;
	/** 聊天室中占有者数量 **/
	private int occupants;
	/** 聊天室的描述 **/
	private String description;
	/** 聊天室的主题 **/
	private String subject;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getJid() {
		return jid;
	}

	public void setJid(String jid) {
		this.jid = jid;
	}

	public int getOccupants() {
		return occupants;
	}

	public void setOccupants(int occupants) {
		this.occupants = occupants;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

} public class MucHistory {
	private String mhRoomName;
	private String FriendAccount;
	private String mhInfo;
	private String mhTime;
	private String mhType;

	public String getMhRoomName() {
		return mhRoomName;
	}

	public void setMhRoomName(String mhRoomName) {
		this.mhRoomName = mhRoomName;
	}

	public String getFriendAccount() {
		return FriendAccount;
	}

	public void setFriendAccount(String friendAccount) {
		FriendAccount = friendAccount;
	}

	public String getMhInfo() {
		return mhInfo;
	}

	public void setMhInfo(String mhInfo) {
		this.mhInfo = mhInfo;
	}

	public String getMhTime() {
		return mhTime;
	}

	public void setMhTime(String mhTime) {
		this.mhTime = mhTime;
	}

	public String getMhType() {
		return mhType;
	}

	public void setMhType(String mhType) {
		this.mhType = mhType;
	}

} public class User implements Parcelable {
	private String userPhote;
	private String userAccount;
	private String personalizedSignature;
	private String date;
	private Drawable userImage;

	public String getUserPhote() {
		return userPhote;
	}

	public void setUserPhote(String userPhote) {
		this.userPhote = userPhote;
	}

	public String getUserAccount() {
		return userAccount;
	}

	public void setUserAccount(String userAccount) {
		this.userAccount = userAccount;
	}

	public String getPersonalizedSignature() {
		return personalizedSignature;
	}

	public void setPersonalizedSignature(String personalizedSignature) {
		this.personalizedSignature = personalizedSignature;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public Drawable getUserImage() {
		return userImage;
	}

	public void setUserImage(Drawable userImage) {
		this.userImage = userImage;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(userPhote);
		dest.writeString(userAccount);
		dest.writeString(date);
		dest.writeString(personalizedSignature);
		dest.writeValue(userImage);
	}

	public static final Parcelable.Creator<User> CREATOR = new Parcelable.Creator<User>() {
		/**
		 * Return a new point from the data in the specified parcel.
		 */
		public User createFromParcel(Parcel in) {
			User u = new User();
			u.readFromParcel(in);
			return u;
		}

		/**
		 * Return an array of rectangles of the specified size.
		 */
		public User[] newArray(int size) {
			return new User[size];
		}
	};

	/**
	 * Set the point's coordinates from the data stored in the specified parcel.
	 * To write a point to a parcel, call writeToParcel().
	 * 
	 * @param in The parcel to read the point's coordinates from
	 */
	public void readFromParcel(Parcel in) {
		userPhote = in.readString();
		userAccount = in.readString();
		date = in.readString();
		personalizedSignature = in.readString();
		ClassLoader Drawable = ClassLoader.getSystemClassLoader();
		userImage = (android.graphics.drawable.Drawable) in.readValue(Drawable);
	}
} public class FormatTools {
	private static FormatTools tools = new FormatTools();

	private FormatTools() {
	}

	public static FormatTools getInstance() {
		if (tools == null) {
			tools = new FormatTools();
			return tools;
		}
		return tools;
	}

	// 将byte[]转换成InputStream
	public InputStream Byte2InputStream(byte[] b) {
		ByteArrayInputStream bais = new ByteArrayInputStream(b);
		return bais;
	}

	// 将InputStream转换成byte[]
	public byte[] InputStream2Bytes(InputStream is) {
		String str = "";
		byte[] readByte = new byte[1024];
		int readCount = -1;
		try {
			while ((readCount = is.read(readByte, 0, 1024)) != -1) {
				str += new String(readByte).trim();
			}
			return str.getBytes();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	// 将Bitmap转换成InputStream
	public InputStream Bitmap2InputStream(Bitmap bm) {
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		bm.compress(Bitmap.CompressFormat.JPEG, 100, baos);
		InputStream is = new ByteArrayInputStream(baos.toByteArray());
		return is;
	}

	// 将Bitmap转换成InputStream
	public InputStream Bitmap2InputStream(Bitmap bm, int quality) {
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		bm.compress(Bitmap.CompressFormat.PNG, quality, baos);
		InputStream is = new ByteArrayInputStream(baos.toByteArray());
		return is;
	}

	// 将InputStream转换成Bitmap
	public Bitmap InputStream2Bitmap(InputStream is) {
		return BitmapFactory.decodeStream(is);
	}

	// Drawable转换成InputStream
	public InputStream Drawable2InputStream(Drawable d) {
		Bitmap bitmap = this.drawable2Bitmap(d);
		return this.Bitmap2InputStream(bitmap);
	}

	// InputStream转换成Drawable
	public Drawable InputStream2Drawable(InputStream is) {
		Bitmap bitmap = this.InputStream2Bitmap(is);
		return this.bitmap2Drawable(bitmap);
	}

	// Drawable转换成byte[]
	public byte[] Drawable2Bytes(Drawable d) {
		Bitmap bitmap = this.drawable2Bitmap(d);
		return this.Bitmap2Bytes(bitmap);
	}

	// byte[]转换成Drawable
	public Drawable Bytes2Drawable(byte[] b) {
		Bitmap bitmap = this.Bytes2Bitmap(b);
		return this.bitmap2Drawable(bitmap);
	}

	// Bitmap转换成byte[]
	public byte[] Bitmap2Bytes(Bitmap bm) {
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		bm.compress(Bitmap.CompressFormat.PNG, 100, baos);
		return baos.toByteArray();
	}

	// byte[]转换成Bitmap
	public Bitmap Bytes2Bitmap(byte[] b) {
		if (b.length != 0) {
			return BitmapFactory.decodeByteArray(b, 0, b.length);
		}
		return null;
	}

	// Drawable转换成Bitmap
	public Bitmap drawable2Bitmap(Drawable drawable) {
		Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), drawable.getOpacity() != PixelFormat.OPAQUE ? Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565);
		Canvas canvas = new Canvas(bitmap);
		drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
		drawable.draw(canvas);
		return bitmap;
	}

	// Bitmap转换成Drawable
	public Drawable bitmap2Drawable(Bitmap bitmap) {
		BitmapDrawable bd = new BitmapDrawable(bitmap);
		Drawable d = (Drawable) bd;
		return d;
	}
} public class L {
	private static final boolean flag = true;

	public static void i(String tag, String msg) {
		if (flag)
			Log.i(tag, msg);
	}

	public static void d(String tag, String msg) {
		if (flag)
			Log.d(tag, msg);
	}

	public static void e(String tag, String msg) {
		if (flag)
			Log.e(tag, msg);
	}

	public static void e(String tag, String msg, Throwable tr) {
		if (flag)
			Log.e(tag, msg, tr);
	}

	public static void v(String tag, String msg) {
		if (flag)
			Log.v(tag, msg);
	}

	public static void m(String tag, String msg) {
		if (flag)
			Log.e(tag, msg);
	}

	public static void w(String tag, String msg) {
		if (flag)
			Log.w(tag, msg);
	}
} public class LogUtil {

	@SuppressWarnings("unchecked")
	public static String makeLogTag(Class cls) {
		return "Weixin_" + cls.getSimpleName();
	}

}
 public class SpUtil {

	private SharedPreferences sp;

	public SpUtil(Context context) {
		sp = context.getSharedPreferences(Constants.SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE);
	}

	/**
	 * 判断某个键值对是否存在
	 * 
	 * @param key
	 * @return
	 */
	public boolean contains(String key) {
		return sp.contains(key);
	}

	/**
	 * 保存配置信息
	 * 
	 * @param key
	 * @param value
	 */
	public void saveBoolean(String key, boolean value) {
		sp.edit().putBoolean(key, value).commit();
	}

	/**
	 * 保存配置信息
	 * 
	 * @param key
	 * @param value
	 */
	public void saveFloat(String key, float value) {
		sp.edit().putFloat(key, value).commit();
	}

	/**
	 * 保存配置信息
	 * 
	 * @param key
	 * @param value
	 */
	public void saveLong(String key, long value) {
		sp.edit().putLong(key, value).commit();
	}

	/**
	 * 保存配置信息
	 * 
	 * @param key
	 * @param value
	 */
	public void saveInt(String key, int value) {
		sp.edit().putInt(key, value).commit();
	}

	/**
	 * 保存配置信息
	 * 
	 * @param key
	 * @param value
	 */
	public void saveString(String key, String value) {
		sp.edit().putString(key, value).commit();
	}

	/**
	 * 保存配置信息
	 * 
	 * @param key
	 * @param value
	 */
	@SuppressLint("NewApi")
	public void saveStringSet(String key, Set<String> values) {
		sp.edit().putStringSet(key, values).commit();
	}

	/**
	 * 获得配置信息
	 * 
	 * @param key
	 * @param defValue
	 * @return
	 */
	public String getString(String key, String... defValue) {
		if (defValue.length > 0) {
			return sp.getString(key, defValue[0]);
		} else {
			return sp.getString(key, "");
		}
	}

	/**
	 * 获得配置信息
	 * 
	 * @param key
	 * @param defValue
	 * @return
	 */
	public int getInt(String key, int... defValue) {
		if (defValue.length > 0) {
			return sp.getInt(key, defValue[0]);
		} else {
			return sp.getInt(key, 0);
		}
	}

	/**
	 * 获得配置信息
	 * 
	 * @param key
	 * @param defValue
	 * @return
	 */
	public boolean getBoolean(String key, boolean... defValue) {
		if (defValue.length > 0) {
			return sp.getBoolean(key, defValue[0]);
		} else {
			return sp.getBoolean(key, false);
		}
	}

	/**
	 * 获得配置信息
	 * 
	 * @param key
	 * @param defValue
	 * @return
	 */
	public float getFloat(String key, float... defValue) {
		if (defValue.length > 0) {
			return sp.getFloat(key, defValue[0]);
		} else {
			return sp.getFloat(key, 0);
		}
	}

	/**
	 * 获得配置信息
	 * 
	 * @param key
	 * @param defValue
	 * @return
	 */
	public long getLong(String key, long... defValue) {
		if (defValue.length > 0) {
			return sp.getLong(key, defValue[0]);
		} else {
			return sp.getLong(key, 0);
		}
	}

	/**
	 * 获得配置信息
	 * 
	 * @return
	 */
	public Map<String, ?> getAll() {
		return sp.getAll();
	}

	/**
	 * 获得配置信息
	 * 
	 * @param key
	 * @param defValue
	 * @return
	 */
	@SuppressLint("NewApi")
	public Set<String> getStringSet(String key, Set<String>... defValue) {
		if (defValue.length > 0) {
			return sp.getStringSet(key, defValue[0]);
		} else {
			return sp.getStringSet(key, null);
		}
	}
} public class TaxiChatManagerListener implements ChatManagerListener {

	@Override
	public void chatCreated(Chat chat, boolean arg1) {
		chat.addMessageListener(new MessageListener() {

			@Override
			public void processMessage(Chat arg0, Message msg) {//登录用户
				StringUtils.parseName(XmppManager.getInstance().getConnection().getUser());
				//发送消息用户
				msg.getFrom();
				//消息内容
				String body = msg.getBody();
				System.out.println("body--->" + body);
				boolean left = body.substring(0, 1).equals("{");
				boolean right = body.substring(body.length() - 1, body.length()).equals("}");
				if (left && right) {
					try {
						JSONObject obj = new JSONObject(body);
						String type = obj.getString("messageType");
						String chanId = obj.getString("chanId");
						String chanName = obj.getString("chanName");

						System.out.println("---body--->" + body);
					} catch (JSONException e) {
						e.printStackTrace();
					}
				}
				
				
				Intent intent = new Intent("net.cgt.weixin.chat");
				intent.setFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);// 包含从未启动过的应用
				intent.putExtra("from", msg.getFrom());
				intent.putExtra("body", body);
				GlobalParams.activity.sendBroadcast(intent);
			}
		});
	}

}
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import net.cgt.weixin.Constants;
import net.cgt.weixin.GlobalParams;
import net.cgt.weixin.R;
import net.cgt.weixin.domain.FriendRooms;
import net.cgt.weixin.domain.MucHistory;
import net.cgt.weixin.domain.User;
import net.cgt.weixin.utils.FormatTools;
import net.cgt.weixin.utils.L;
import net.cgt.weixin.utils.LogUtil;
import net.cgt.weixin.utils.SpUtil;
import net.cgt.weixin.view.listener.TaxiChatManagerListener;
import org.jivesoftware.smack.Chat;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.ConnectionConfiguration.SecurityMode;
import org.jivesoftware.smack.MessageListener;
import org.jivesoftware.smack.PacketCollector;
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.Roster;
import org.jivesoftware.smack.RosterEntry;
import org.jivesoftware.smack.RosterGroup;
import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.filter.AndFilter;
import org.jivesoftware.smack.filter.PacketFilter;
import org.jivesoftware.smack.filter.PacketIDFilter;
import org.jivesoftware.smack.filter.PacketTypeFilter;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.packet.Registration;
import org.jivesoftware.smack.provider.ProviderManager;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smackx.Form;
import org.jivesoftware.smackx.FormField;
import org.jivesoftware.smackx.ReportedData;
import org.jivesoftware.smackx.ReportedData.Row;
import org.jivesoftware.smackx.ServiceDiscoveryManager;
import org.jivesoftware.smackx.muc.DiscussionHistory;
import org.jivesoftware.smackx.muc.HostedRoom;
import org.jivesoftware.smackx.muc.MultiUserChat;
import org.jivesoftware.smackx.muc.ParticipantStatusListener;
import org.jivesoftware.smackx.muc.RoomInfo;
import org.jivesoftware.smackx.packet.VCard;
import org.jivesoftware.smackx.search.UserSearchManager;
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.Drawable;
			owners.add(getConnection().getUser());// 用户JID  
			submitForm.setAnswer("muc#roomconfig_roomowners", owners);
			// 设置聊天室是持久聊天室，即将要被保存下来  
			submitForm.setAnswer("muc#roomconfig_persistentroom", false);
			// 房间仅对成员开放  
			submitForm.setAnswer("muc#roomconfig_membersonly", false);
			// 允许占有者邀请其他人  
			submitForm.setAnswer("muc#roomconfig_allowinvites", true);
			// 进入是否需要密码  
			//submitForm.setAnswer("muc#roomconfig_passwordprotectedroom", true);  
			// 设置进入密码  
			//submitForm.setAnswer("muc#roomconfig_roomsecret", "password");  
			// 能够发现占有者真实 JID 的角色  
			// submitForm.setAnswer("muc#roomconfig_whois", "anyone");  
			// 登录房间对话  
			submitForm.setAnswer("muc#roomconfig_enablelogging", true);
			// 仅允许注册的昵称登录  
			submitForm.setAnswer("x-muc#roomconfig_reservednick", true);
			// 允许使用者修改昵称  
			submitForm.setAnswer("x-muc#roomconfig_canchangenick", false);
			// 允许用户注册房间  
			submitForm.setAnswer("x-muc#roomconfig_registration", false);
			// 发送已完成的表单（有默认值）到服务器来配置聊天室  
			submitForm.setAnswer("muc#roomconfig_passwordprotectedroom", true);
			// 发送已完成的表单（有默认值）到服务器来配置聊天室  
			muc.sendConfigurationForm(submitForm);
		} catch (XMPPException e) {
			e.printStackTrace();
		}
	}

	/**
	 * 加入会议室
	 * 
	 * @param user 昵称
	 * @param password 会议室密码
	 * @param roomsName 会议室名
	 */
	public MultiUserChat joinMultiUserChat(String user, String password, String roomsName) {
		try {
			// 使用XMPPConnection创建一个MultiUserChat窗口  
			MultiUserChat muc = new MultiUserChat(getConnection(), roomsName + "@conference." + getConnection().getServiceName());
			// 聊天室服务将会决定要接受的历史记录数量  
			DiscussionHistory history = new DiscussionHistory();
			history.setMaxStanzas(0);
			//history.setSince(new Date());  
			// 用户加入聊天室  
			muc.join(user, password, history, SmackConfiguration.getPacketReplyTimeout());
			L.i(LOGTAG, "会议室加入成功........");
			return muc;
		} catch (XMPPException e) {
			e.printStackTrace();
			L.i(LOGTAG, "会议室加入失败........");
			return null;
		}
	}

	/**
	 * 查询会议室成员名字
	 * 
	 * @param muc
	 */
	public List<String> findMulitUser(MultiUserChat muc) {
		List<String> listUser = new ArrayList<String>();
		Iterator<String> it = muc.getOccupants();
		//遍历出聊天室人员名称  
		while (it.hasNext()) {
			// 聊天室成员名字  
			String name = StringUtils.parseResource(it.next());
			listUser.add(name);
		}
		return listUser;
	}

	/**
	 * 获取服务器上所有会议室
	 * 
	 * @return
	 * @throws XMPPException
	 */
	public List<FriendRooms> getConferenceRoom() throws XMPPException {
		List<FriendRooms> list = new ArrayList<FriendRooms>();
		new ServiceDiscoveryManager(getConnection());
		if (!MultiUserChat.getHostedRooms(getConnection(), getConnection().getServiceName()).isEmpty()) {

			for (HostedRoom k : MultiUserChat.getHostedRooms(getConnection(), getConnection().getServiceName())) {

				for (HostedRoom j : MultiUserChat.getHostedRooms(getConnection(), k.getJid())) {
					RoomInfo info2 = MultiUserChat.getRoomInfo(getConnection(), j.getJid());
					if (j.getJid().indexOf("@") > 0) {

						FriendRooms friendrooms = new FriendRooms();
						friendrooms.setName(j.getName());//聊天室的名称  
						friendrooms.setJid(j.getJid());//聊天室JID  
						friendrooms.setOccupants(info2.getOccupantsCount());//聊天室中占有者数量  
						friendrooms.setDescription(info2.getDescription());//聊天室的描述  
						friendrooms.setSubject(info2.getSubject());//聊天室的主题  
						list.add(friendrooms);
					}
				}
			}
		}
		return list;
	}

	//	五、监听会议室的消息
	//	添加会议室消息监听 ：
	//multiChat.addMessageListener(new multiListener());
	/**
	 * 会议室信息监听事件
	 * 
	 * @author Administrator
	 * 
	 */
	public class multiListener implements PacketListener {
		@Override
		public void processPacket(Packet packet) {
			Message message = (Message) packet;
			// 接收来自聊天室的聊天信息  
			String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
			MucHistory mh = new MucHistory();