I'm actually using it like as the code below and I'm still getting this
error when building for iOS. The Android build works just fine.
public static void getWebService(ClientResponseCallback callback,
String url) {
WebSocket sock = new WebSocket(url) {
@Override
protected void onOpen() {
}
@Override
protected void onClose(int statusCode, String reason) {
}
@Override
protected void onMessage(final String message) {
System.out.println("Received message "+message);
Display.getInstance().callSerially(new Runnable() {
public void run() {
callback.onClientMessage(message);
}
});
}
@Override
protected void onError(Exception ex) {
Display.getInstance().callSerially(new Runnable() {
public void run() {
callback.onClientError(ex);
}
});
}
@Override
protected void onMessage(byte[] message) {
}
};
sock.connect();
}
On Monday, August 15, 2016 at 10:21:05 PM UTC-6, Shai Almog wrote:
>
> Do you use the WebSocket class from code?
> These errors happen if the native code includes a Java class but the VM
> stripped it out because it is unused.
>
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/1334a8b9-72a6-45c8-85ea-649c585a7aff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.