// here, i am calling invoke method to send message
mHubProxy.invoke("SendPrivateMessage", "30", "31", "test message", "");
public static JSONObject decodeResult(Object result) throws JSONException {
if (result == null)
return null;
Gson gson = new GsonBuilder().serializeNulls().create();//Fix the missing null attributes problem
return new JSONObject(gson.toJson(result));
}
============================== i am getting following error log
E/ChatActivity: mHubConnection.error :: java.lang.RuntimeException: The handler has 1 parameters, but there are 7 values.
W/System.err: java.lang.RuntimeException: The handler has 1 parameters, but there are 7 values.
W/System.err: at microsoft.aspnet.signalr.client.hubs.HubProxy$5.run(HubProxy.java:332)
W/System.err: at microsoft.aspnet.signalr.client.hubs.HubProxy$5.run(HubProxy.java:1)
W/System.err: at microsoft.aspnet.signalr.client.hubs.Subscription.onReceived(Subscription.java:31)
W/System.err: at microsoft.aspnet.signalr.client.hubs.HubProxy.invokeEvent(HubProxy.java:308)
W/System.err: at microsoft.aspnet.signalr.client.hubs.HubConnection.onReceived(HubConnection.java:118)
W/System.err: at microsoft.aspnet.signalr.client.transport.TransportHelper.processReceivedData(TransportHelper.java:96)
W/System.err: at microsoft.aspnet.signalr.client.Connection.processReceivedData(Connection.java:733)
W/System.err: at microsoft.aspnet.signalr.client.Connection.access$0(Connection.java:728)
W/System.err: at microsoft.aspnet.signalr.client.Connection$10.onData(Connection.java:671)
W/System.err: at microsoft.aspnet.signalr.client.transport.ServerSentEventsTransport$1.onResponse(ServerSentEventsTransport.java:104)
W/System.err: at microsoft.aspnet.signalr.client.http.java.NetworkRunnable.run(NetworkRunnable.java:82)
W/System.err: at java.lang.Thread.run(Thread.java:761)
HubConnection mHubConnection; HubProxy mHubProxy;
try { Platform.loadPlatformComponent(new AndroidPlatformComponent()); mHubConnection = new HubConnection("http://differenzuat.com/SignalRChat/signalr/hubs"); mHubProxy = mHubConnection.createHubProxy("ChatHub"); ClientTransport transport = new ServerSentEventsTransport(mHubConnection.getLogger());
// here, i am calling invoke method to send message mHubProxy.invoke("SendPrivateMessage", "30", "31", "test message", "");
public static JSONObject decodeResult(Object result) throws JSONException { if (result == null) return null; Gson gson = new GsonBuilder().serializeNulls().create();//Fix the missing null attributes problem return new JSONObject(gson.toJson(result)); }
============================== i am getting following error log
E/ChatActivity: mHubConnection.error :: java.lang.RuntimeException: The handler has 1 parameters, but there are 7 values. W/System.err: java.lang.RuntimeException: The handler has 1 parameters, but there are 7 values. W/System.err: at microsoft.aspnet.signalr.client.hubs.HubProxy$5.run(HubProxy.java:332) W/System.err: at microsoft.aspnet.signalr.client.hubs.HubProxy$5.run(HubProxy.java:1) W/System.err: at microsoft.aspnet.signalr.client.hubs.Subscription.onReceived(Subscription.java:31) W/System.err: at microsoft.aspnet.signalr.client.hubs.HubProxy.invokeEvent(HubProxy.java:308) W/System.err: at microsoft.aspnet.signalr.client.hubs.HubConnection.onReceived(HubConnection.java:118) W/System.err: at microsoft.aspnet.signalr.client.transport.TransportHelper.processReceivedData(TransportHelper.java:96) W/System.err: at microsoft.aspnet.signalr.client.Connection.processReceivedData(Connection.java:733) W/System.err: at microsoft.aspnet.signalr.client.Connection.access$0(Connection.java:728) W/System.err: at microsoft.aspnet.signalr.client.Connection$10.onData(Connection.java:671) W/System.err: at microsoft.aspnet.signalr.client.transport.ServerSentEventsTransport$1.onResponse(ServerSentEventsTransport.java:104) W/System.err: at microsoft.aspnet.signalr.client.http.java.NetworkRunnable.run(NetworkRunnable.java:82) W/System.err: at java.lang.Thread.run(Thread.java:761)