Open venkykowshik opened 7 years ago
Try to use two different android phones instead.It should work.
Thank you for your reply.But also I tried with android Phone but still it is not working.
Hey try to use library version 1.7.1. Can you just list down emitter and listener code down here?
Yes i am using the 1.7.1 library only
see this below if could help me
socket.on("MODPR14", new Emitter.Listener() {
@Override
public void call(String name, Object data) {
Log.v("Recieved Msg","Got message for channel "+name+" data is "+data);
}
});
Socket.Channel channel=socket.getChannelByName("MODPR14");
channel.onMessage(new Emitter.Listener() {
public void call(String channelName , Object object) {
Log.v("Recieved Msg","Got message for channel "+channelName+" data is "+object);
}
});
socket.onSubscribe("MODPR14",new Emitter.Listener() {
@Override
public void call(String name, final Object data) {
Log.v("Recieved Msg","Got message for channel "+name+" data is "+data);
}
});
There is no emitter code in above snippet. When using channels, you have to create one and then subscribe to it. Then only you can use channel.onMessage(). Just read the docs carefully. Give me the link to your repo. if possible.
Also give me the current version of socketcluster :)
1.7.1 i am using it and let me send you whole snippet of code by Git
hey Dude did you check the code did do anything wrong in that
Hey I'm currently busy due to lot of work, I will be back after work is finished. Will solve the problem for sure :+1:
Hey in your private void registerForMessages() method remove first two unnecessary callbacks, just keep
socket.onSubscribe("MODPR14",new Emitter.Listener() {
@Override
public void call(String name, final Object data) {
Log.v("Recieved Msg","Got message for channel "+name+" data is "+data);
}
});
Try to keep private void registerForMessages() outside runnable
I tried with that all options still not able to fix that can you help with that
Upload your code on github repo., I will try to debug it
sure i will do that send a link to you
Hey Dude did u get a chance to look at my code....
Please look into that code when you get a chance dude Thanks in Advance
Hey actually I'm a lot busy those days, will it be ok if I ping you after 2-3 days :)
Ok Dude thanks for the info will be waiting for reply
Any update on this
i tried your demo and i was able send messages to other client but i was not able to recieve the messages from client what might be the reason is there any issue with code.
Note: I was using emaultor and testing with website