android - koush AndroidAsync Socket.IO : Looks like ConnectCallback() is not triggered on Google Glass -



android - koush AndroidAsync Socket.IO : Looks like ConnectCallback() is not triggered on Google Glass -

im trying allow google glass , android phone connect nodejs server im running on computer, can send messages android phone google glass.

for i'm using koush's androidasync library, works great on android phone , have absolutely no problem connecting phone nodejs server library.

however, same code doesnt seem work on google glass. google glass connect, because on connection eventhandler of nodejs server triggered, doesn't seem trigger of connectcallback functions on google glass.

here code i'm using in google glass app:

socketioclient.connect(asynchttpclient.getdefaultinstance(), "http://192.168.1.229:5000", new connectcallback() { @override public void onconnectcompleted(exception ex, socketioclient client) { log.i("socket", "connection completed"); if (ex != null) { ex.printstacktrace(); return; } client.setstringcallback(new stringcallback() { @override public void onstring(string string, acknowledge acknowledge) { log.d("socket", string); } }); client.setjsoncallback(new jsoncallback() { @override public void onjson(jsonobject jsonobject, acknowledge acknowledge) { log.d("socket", jsonobject.tostring()); } }); client.on("event", new eventcallback() { @override public void onevent(jsonarray jsonarray, acknowledge acknowledge) { log.i("data: ", jsonarray.tostring()); gson gson = new gson(); } }); mclient = client; } }); }

as can see, im trying log "connection completed" in onconnectcompleted method, never fires , nil ever logged.

i find rather strange, same code work on android phone , "connection completed" logged when run bit of code on android phone. strangest thing node server picks google glass on connection event triggered on server when glass connects.

so, can help me find out why google glass apparently connecting nodejs server, not triggering events when connects. (not triggering connectcallback functions, "connection completed" never logged)?

thanks in advance,

bram

android node.js sockets google-glass aero-glass

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -