0

My app tries to get the balance of an ethereum address, but when testing, it crashes. I get the error "E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!" in logcat. Using web3 and android studio.

Web3j web3 = Web3jFactory.build(new 
HttpService("https://ropsten.infura.io/token"));

    EthGetBalance ethGetBalance = null;
    try {
        ethGetBalance = web3
                .ethGetBalance("myethaddress", DefaultBlockParameterName.LATEST)
                .sendAsync()
                .get();
    } catch (InterruptedException e) {
        e.printStackTrace();
    } catch (ExecutionException e) {
        e.printStackTrace();
    }

    BigInteger wei = ethGetBalance.getBalance();

All in my onCreate method. I have internet permissions on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.