Ejemplo n.º 1
0
	@Override
	protected void deleteUserReceive(User user) {
		if (user == null)
			return;
		Toast.makeText(this,
				(user.getName() == null) ? user.getJID() : user.getName()
						+ "被删除了", Toast.LENGTH_SHORT).show();
		refreshList();
	}
Ejemplo n.º 2
0
	@Override
	protected void changePresenceReceive(User user) {
		if (user == null)
			return;
		if (ContacterManager.contacters.get(user.getJID()) == null)
			return;
		if (!user.isAvailable())
			if (ContacterManager.contacters.get(user.getJID()).isAvailable())
				Toast.makeText(this,
						(user.getName() == null) ? user.getJID() : user
								.getName() + "上线了", Toast.LENGTH_SHORT).show();
		if (user.isAvailable())
			if (!ContacterManager.contacters.get(user.getJID()).isAvailable())
				Toast.makeText(this,
						(user.getName() == null) ? user.getJID() : user
								.getName() + "下线了", Toast.LENGTH_SHORT).show();
		refreshList();
	}