I’m building a extension for Binance websocket. I am getting the following error even though I started it with Thread. What should I do?
@SimpleFunction
public void GetPrice(String symbol){
this.activity.runOnUiThread(new Runnable() {
@Override
public void run() {
client.onAggTradeEvent(symbol.toLowerCase(), new BinanceApiCallback<AggTradeEvent>() {
@Override
public void onResponse(final AggTradeEvent response) {
Price(response.toString());
}
@Override
public void onFailure(final Throwable cause) {
Fail("Web Socket Failed");
cause.printStackTrace(System.err);
}
});
}
});
}