Open akovacevic opened 10 years ago
Place a breakpoint here https://github.com/erizet/SignalA/blob/master/SignalA/src/main/java/com/zsoft/signala/Transport/TransportHelper.java#L64
And look at the respone and messageArray variables...then paste them here.
It works just fine when you send across an object. But fails to do the same when you send over a JSON wrapped int or String.
I pulled the code down as a dependency and don't have access the the .java files at the moment. When i get more free time i'll go back and see If i can get to the root of the problem.
Ok, in the meantime can you post your code here?
did you guys solved it ? i am stuck right here,looking for some help..thanks.
Oh..i checked the source code,and i found that JSONArray (var: messagesArray=response.optJSONArray ()) doesn't work properly....the messagesArray have no JSONObject but String.....
this is before:
after i changed value of messageArray:
am i right?
i was solved this problem yesterday..and i committed it to my own repo.Add a for loop after L64,Tansform the String to JSONObject before calling it.
When receiving a message from SignalR, i get the following error:
686-686/com.example.adis.shuttleservice E/TransportHelper﹕ Error when calling setMessage on connection. org.json.JSONException: Value hello at 0 of type java.lang.String cannot be converted to JSONObject