Android : "FAILED BINDER TRANSACTION" when using SignalR client

on Tuesday, October 7, 2014


I'm developing an app that uses this library from Microsoft SignalR team, it seems great. Now I wanna use it in my android application, so I'm using it this way:



HubConnection connection = new HubConnection(DEFAULT_SERVER_URL);
final HubProxy proxy = connection.createHubProxy("FitnessHub");
connection.error(new ErrorCallback() {
@Override
public void onError(Throwable error) {
}
});
connection.start().done(new Action<Void>() {
@Override
public void run(Void obj) throws Exception {
proxy.invoke("showNotification", new Object()).done(new Action<Void>() {
@Override
public void run(Void obj) throws Exception {
Toast.makeText(getApplicationContext(), "Hello", Toast.LENGTH_LONG).show();
}
});
}
});


Hub:



public class FitnessHub : Hub
{
public void SendNotification()
{
Clients.Others.showNotification();
}

}


But, I always getting this error in LogCat:



!!! FAILED BINDER TRANSACTION !!!

channel 'b13f7160 com.example.signalrclient/com.example.signalrclient.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!


Any idea?


0 comments:

Post a Comment