LaravelEchoAndroid
LaravelEchoAndroid copied to clipboard
Channel Listener issue in android
Hello, i am trying to listen my channel and it was working fine, but suddenly it stops working, i can not listen my channel.
can you please help me over this.
`EchoOptions options = new EchoOptions();
// Setup host of your Laravel Echo Server
options.host = WebUtils.CHAT_SOCKET_URL;
options.headers.put("Authorization", "Bearer ");
// Create the client
echo = new Echo(options);
echo.connect(args -> {
Log.e("Connect: ", Arrays.toString(args));
if (echo.isConnected()) {
echo.channel(mChatChannel).listen(mMessageSent, args -> {
Log.d("Listner body");
}
}, args -> {
Log.e("Error: ", Arrays.toString(args));
// Error connect
});`
@prsnt Did you find any solution? I am also facing same problem.
Problem arise when we leave
a channel and listen
that channel again, now I am not using leave
method so I am not getting this issue, I think there is some problem in leave
method.