Note that after asking many, many times and googling many, many times, I have not found a solution for using threads, so let's stay away from that

My goal with using AsyncTask is to wait for a button click before continuing code:

Using AsyncTask, I want a loop to pause, and only continue after I click a button. For various reasons, it must be in that order, and not after I click a button, then it does a loop etc. Is there a way to do this? Feel free to ask any questions