I would like to call a non-static method in the for-loop inside the onHandleWork. How can I achieve that?
@Override
protected void onHandleWork(@NonNull Intent intent) {
Log.d(TAG, "onHandleWork");
String input = intent.getStringExtra("inputExtra");
for (int i = 0; i < 10; i++) {
Log.d(TAG, input + " - " + i);
new MainActivity.method();
if (isStopped()) return;
SystemClock.sleep(1000);
}
}