Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with react native Android? #71

Open
tgoldenberg opened this issue Oct 27, 2015 · 1 comment
Open

Use with react native Android? #71

tgoldenberg opened this issue Oct 27, 2015 · 1 comment

Comments

@tgoldenberg
Copy link

Hi,
This is a great package, and I have used it effectively with react native and iOS. However, now that react-native has support for the Websocket module, can this work for Android as well? And if so, it would be great to see some examples of it. With the following code, I get errors: `let ddpclient = new DDPClient({
url: 'ws://localhost:3000/websocket'
});

console.log('DDP', ddpclient);
ddpclient.connect((error, wasReconnect) => {
  if (error) {
    console.log('DDP connection error!');
    return;
  }
  if (wasReconnect) {
    console.log('Reestablishment of a connection');
  }
  console.log('Connected!');
});
ddpclient.subscribe('messages', [], ()=> {
  console.log('messages complete:');
  console.log(ddpclient.collections.messages);
});

ddpclient.on('message', (msg) => {
  console.log('ddp message: ' + msg);
})`
@vsivsi
Copy link
Member

vsivsi commented Oct 28, 2015

There's a long-standing PR for this here: #56

As I say near the bottom of that thread, the issue is that a bunch of test dev and validation probably needs to happen that nobody has stepped up to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants