i have a function
protected void updateLogs()
in my activity (MainActivity).
I need to call this function with delay. I cann't use this method https://stackoverflow.com/a/9166354/3883330 because i can't call function from other class, because it's not static function. Code with error:
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
MainActivity.updateLogs();
}
}, 100);
How can i solve this?