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

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)
  • Thanks, I will test it and keep you updated – tomsoft 2 days ago

Your Answer

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

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