mHandler = new Handler();
Runnable r = new Runnable() {
public void run() {
BigInt bBalance = new BigInt(0);
try {
Address address = new Address(addressString);
mEthereumClient.getBalanceAt(mContext, address, DEFAULT_TO_CURRENT_BLOCK_VALUE);
}catch (Exception e)
{
DerbyLog.LogError("getBalanceAt " + e.getMessage().toString());
}
//每隔1s循环执行run方法
mHandler.postDelayed(this, 10000);
}
};
mHandler.postDelayed(r,100);
this code will stop with unknown reason why?