LaravelEchoAndroid icon indicating copy to clipboard operation
LaravelEchoAndroid copied to clipboard

Channel Listener issue in android

Open prsnt opened this issue 4 years ago • 2 comments

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 avatar Jun 26 '20 05:06 prsnt

@prsnt Did you find any solution? I am also facing same problem.

divysoni3 avatar Oct 23 '20 11:10 divysoni3

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.

divysoni3 avatar Nov 02 '20 08:11 divysoni3