0

I'm just trying to connect to my websocket server :

ws = net().createWebSocket("ws://192.168.0.3:8000/sample", this);

It works fine when I test it with mvn test -Pjava

But when I load it with my Google Nexus S (under Icecream sandwich), I get :

E/AndroidRuntime( 4321): FATAL EXCEPTION: GLThread 352
E/AndroidRuntime( 4321): java.lang.UnsupportedOperationException
E/AndroidRuntime( 4321):        at playn.core.NetImpl.createWebSocket(NetImpl.java:27) 
E/AndroidRuntime( 4321):        at com.github.dawicorti.qrcomsample.core.CommunicationScreen.<init>(CommunicationScreen.java:34)
E/AndroidRuntime( 4321):        at com.github.dawicorti.qrcomsample.core.QRComSample.init(QRComSample.java:12)
E/AndroidRuntime( 4321):        at playn.android.AndroidPlatform.run(AndroidPlatform.java:170)
E/AndroidRuntime( 4321):        at playn.core.PlayN.run(PlayN.java:47)
E/AndroidRuntime( 4321):        at com.github.dawicorti.qrcomsample.android.QRComSampleActivity.main(QRComSampleActivity.java:13)
E/AndroidRuntime( 4321):        at playn.android.GameViewGL$3.run(GameViewGL.java:94)
E/AndroidRuntime( 4321):        at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462)
E/AndroidRuntime( 4321):        at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
W/ActivityManager(  249):   Force finishing activity com.github.dawicorti.qrcomsample.android/.QRComSampleActivity
Rajesh
  • 15,724
  • 7
  • 46
  • 95
dawi
  • 628
  • 6
  • 18
  • Not 100% sure so you will want to double check, but I don't think websockets in PlayN are supported on Android. – Joachim Isaksson Jan 01 '13 at 15:44
  • I don't know ... On this page http://code.google.com/p/playn/wiki/PlatformStatus it says that Net is full implemented on all platforms – dawi Jan 02 '13 at 09:56

1 Answers1

0

WebSockets are (as of March 2013), not supported in the Android backend. They're only supported in the Java and HTML backends.

I'll update the platform status page.

samskivert
  • 3,694
  • 20
  • 22