eoinsha / JavaPhoenixChannels

Java and Android channel client for the Phoenix Framework
BSD 3-Clause "New" or "Revised" License
203 stars 101 forks source link

I can't download successful version JavaPhoenixChannels 1.0 for androidstudio,and error reporting when i using version 0.2 to disconnection reconnection #73

Open a450479378 opened 5 years ago

a450479378 commented 5 years ago

hellow ,i want to using JavaPhoenixChannels to android , and i have two problems

first problem

i add

repositories {
        google()
        jcenter()
        maven { url 'http://dl.bintray.com/eoinsha/java-phoenix-channels' }
    }   

but i can't download JavaPhoenixChannels version 1.0

second problem

i successful to connect websocket ,and i try to reconnect with broken line then something went wrong. like this

2018-11-28 18:18:30.789 30717-30733/com.ssh.kotlinchat E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
    Process: com.ssh.kotlinchat, PID: 30717
    java.util.ConcurrentModificationException
        at java.util.ArrayList$Itr.next(ArrayList.java:831)
        at org.phoenixframework.channels.Socket$PhoenixWSListener.onMessage(Socket.java:82)
        at okhttp3.internal.ws.RealWebSocket$1.onMessage(RealWebSocket.java:62)
        at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:242)
        at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:108)
        at okhttp3.internal.ws.RealWebSocket.readMessage(RealWebSocket.java:97)
        at okhttp3.ws.WebSocketCall.createWebSocket(WebSocketCall.java:152)
        at okhttp3.ws.WebSocketCall.access$000(WebSocketCall.java:41)
        at okhttp3.ws.WebSocketCall$1.onResponse(WebSocketCall.java:97)
        at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126)
        at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:761)

and it always happen please help me

bebus77 commented 5 years ago

You can use version 1.0 using jitpack.io as a maven repository then adding the repo as a dependency.

repositories {
  ...
  maven {
    url "https://jitpack.io"
  }
}
implementation "com.github.eoinsha:JavaPhoenixChannels:v1.0.0"
SPrio-kt commented 4 years ago

This above solution worked for me.