title: android passing String array and String to asyncTask
body: <p>I would like to pass String array and String variable to my AsyncTask class. I am new to programming android apps so It is possible that this is not the most efficient way to achieve my goal. Anyways, I have String array called separate[] and String selected. </p>
  
  <p>In separate[] I have loaded values from EditText View and in selected, there is a value from my spinner. Now I want to work with these in my AsyncTask. My AsyncTask class looks now like this:</p>
  
  <pre><code> final class cyklus extends AsyncTask&lt;String[], Void, String[]&gt;{
  String[] tones = {"C","Cis","D","Dis","E","F","Fis","G","Gis","A","Ais","B"};
  String[] result;
  
  @Override
  protected String[] doInBackground(String[]... params) {
  
      int l =params.length;  //length of separate[]
  
      for(int k=0; k==l; k++){   // finding indexes of matches of elements separate[k] in tones[] 
  
          // INPUT POSITION
                  int i= Arrays.asList(tones).indexOf(params[k]);
  
  
          // RESULT INDEX
                  int j =Integer.parseInt(selected);
                  int index = i+j;    
  
  
          // RESULT
                  String res=tones[index];
                  result[k]=res;                          
  
  }
  
      return result;
  }
   }
  </code></pre>
  
  <p>After this for loop is done, I would like my AsyncTask to return result[]. To sum up tis, I would like to know how can I work with "separate[]" and "selected" in my AsyncTask class. Thank you. </p>
  
  <p>EDIT: One more subquestion. My for loop wont start. Why? Thank you.</p>