1

I am developing an app on Android, but Web3j does not support events on infura ( Should I use Infura with Web3j for Event filter? ) .

What are the options, I did not find any alternative library?

0

1 Answer 1

0

I dont know if this will work on Android, but try something like this:

WebSocketService webSocketService = new WebSocketService("wss://kovan.infura.io/ws/v3/.....'", true);
webSocketService.connect(); 
Web3j web3j = Web3j.build(webSocketService); 

That worked for this generated method (with java 11):

public Flowable<TransferEventResponse> transferEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock)
1
  • Thanks, I will test it and keep you updated
    – tomsoft
    Sep 15, 2019 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.