MeteorPartiesDDPClient icon indicating copy to clipboard operation
MeteorPartiesDDPClient copied to clipboard

Example not working: Unable to connect to server

Open srinivasmangipudi opened this issue 10 years ago • 5 comments

Trying to run this example from android studio, but the example is not connecting to the meteor server at demoparties.meteor.com. The error is: "web socket initialising error (exception in callback?)"

I think the DDPClient is not able to initialise the native android web socket.

srinivasmangipudi avatar Feb 20 '15 09:02 srinivasmangipudi

You should be connecting to your own copy of the server. The demo Android client in the app store has no problems connecting to my server...

kenyee avatar Feb 21 '15 21:02 kenyee

Where do you specify the meteor server to connect to?

jbrozena22 avatar Jul 01 '15 17:07 jbrozena22

I've been searching for the same. Where do we specify the meteor server?

prathviraj080 avatar Jul 02 '15 12:07 prathviraj080

override sMeteorServer or initInstance in the MyDDPState.java.

kenyee avatar Jul 02 '15 19:07 kenyee

i was looking on the server config, sMeteorServer is a final string which means that's not overridable. Also, it seems like an hardcoded value for createDDPClient.

..... public void createDDPCLient() { try { this.mDDP = new DDPClient("demoparties.meteor.com", sMeteorPort); } catch (URISyntaxException var2) { Log.e("DDPStateSingleton", "Invalid Websocket URL connecting to demoparties.meteor.com:" + sMeteorPort); } .......

daywong1119 avatar Aug 07 '15 14:08 daywong1119