I need the equivalent code of setTimeOut(call function(),milliseconds); for android.
setTimeOut(call function(),milliseconds);
As a continuation to Valentyn answer using java underscore:
Add dependency to gradle:
dependencies {
compile group: 'com.github.javadev', name: 'underscore', version: '1.15'
}
Java:
import com.github.underscore.lodash.$;
$.setTimeout(new Function() {
public Void apply() {
// work
return null;
}
}, 1000); // 1 second