title: How to pass Booleans and Views to AsyncTask like a pointer in Android
body: <p>I've a newbie question about how to pass something like a pointer to AsyncTask class. In C for example I can pass a pointer of a variable or array so original variable or array will be edited inside my function. I need something that work in this way with AsyncTask.
  I've 2 booleans(<code>bool_1</code> and <code>bool_2</code>) and 2 Image IDs(<code>image_view_id</code> and <code>image_drawing_id</code>) to pass and perform actions on them like this:</p>
  
  <pre><code>while(!bool_1)
    sleep;
  bool_2 = true;
  image_view_id.setImageResource(R.drawable.image_drawing_id);
  </code></pre>
  
  <p>This booleans and IDs are declared in <code>Main_activity extend Activity</code> as globals.</p>
  
  <p>Since I have a lot of flags and IDs, I can't create an AsyncTask for every action I need to perform but I can solve passing pointer as in C, how I can do something similar in Android/Java?</p>