Closed AliEasy closed 3 years ago
I'll need more information on that. By the looks of it, that error was thrown by your signalr server. I can be wrong. Did you try to debug your server code?
Yes I did debug my code. At first when signalr gets connected, OnConnected() method gets called and after that connect().Every this goes ok and connect() call completes with no error. But after that nothing happens. SendNotifications() wont get called.
Another thing is that currently Im using this .Net code for my android application developed by Java and its working just fine. (When debugging .Net code on my android application, after connect() call gets complete and after signalr is connected, SendNotifications() gets called)
I solved my Problem Using newer version of plugin
Map<String, String> header = {"username": "3"};
_signalR = SignalR(http://xxxxxxx/, "notificationHub",
hubMethods: ['RecieveNotification'],
statusChangeCallback: (status) => _onStatusChange(status),
hubCallback: (methodName, message) {
print(methodName);
_connectionChange(message);
},
headers: header);
I am facing same issue. how did you resolve your issue?
I finally managed to get "Connected" status from signalr. Now when I try to invoke hub method I get below error:
My code:(Error occurs when calling method _buttonTapped())
My .Net Code:
OnConnected()
method gets called when signalr status is "Connected".