cpunion / TestRNActionCable

4 stars 1 forks source link

Seems not to work on Android #1

Open LouisJS opened 6 years ago

LouisJS commented 6 years ago

Hi,

This repo have not been updated for a while, so out of precaution, i did try the repository and here is what i have so far : Video Demo

The server works fine. We can see the message are correctly sent. The message are also well received on iOS, but nothing happens on Android.

After adding some console.log, i've noticed the cable disconnected value is always true unlike on iOS.

Any idea ?

masudhossain commented 6 years ago

I am also getting this error. We would really need to make this work for android if at all possible :-/

lmichailian commented 5 years ago

any new ?

jorgeants commented 5 years ago

Hi guys. Any news?

jorge627 commented 5 years ago

Hi I could get it works on android using ngrok, I used rails in port 3000, then I ran ngrok in that port and I used the HTTPS url that ngrok gives me for the createConsumer( ), then it works

import ActionCable from 'react-native-actioncable'
import ActionCableProvider, { ActionCableConsumer } from 'react-actioncable-provider';

const cable = ActionCable.createConsumer('https://b8798f78.ngrok.io/cable');
prajwalsh3tty commented 4 years ago

@jorge627 thanks a lot mate it works