public void createChannel(final String channelToken, final String cId) {
if (socket!=null)
socket.close();
this.channelToken = channelToken;
ChannelFactory.createChannel(channelToken, new ChannelCreatedCallback() {
public void onChannelCreated(final Channel channelResult) {
socket = channelResult.open(new SocketListener() {
public void onOpen() {
onSocketOpen(cId);
}