title: Error running AsyncTask on Textchanged
body: <p>I have an EditText in  a fragment where a user will enter the username; as the user enters the name I want to use the onTextChanged event to make a Http Post request to a server and check if that username is available: it will return a status code indicating if the username is available. 
  when i run it it give me a errors.  Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()</p>
  
  <pre><code>private final TextWatcher mTextEditorWatcher = new TextWatcher() {
  
      public void beforeTextChanged(CharSequence s, int start, int count, int after) {
  
          // When No Password Entered
  
      }
  
      public void onTextChanged(CharSequence s, int start, int before, int count) {
          asycstuffs n = new asycstuffs();
          n.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, 0);
      }
  
      public void afterTextChanged(Editable s) {
  
      }
  };
  
  private class asycstuffs extends AsyncTask&lt;Integer, HomeFeed_Obj, Integer&gt; {
  
      @Override
      protected Integer doInBackground(Integer... params) {
          BufferedReader in = null;
  
          String s = Username.getText().toString();
  
          try {
  
              HttpClient httpclient = new DefaultHttpClient();
              HttpPut httput = new HttpPut("http://my url");
              String responseBody = "";
              HttpResponse response = null;
              try {
  
                  httput.setEntity(new StringEntity(s, "UTF-8"));
                  // Execute HTTP Post Request
                  response = httpclient.execute(httput);
                  // /
  
                  HttpEntity entity = response.getEntity();
                  Log.d("response ok", "username :/ " + response.getStatusLine().getStatusCode());
  
              } catch (ClientProtocolException e) {
                  e.printStackTrace();
              } catch (IOException e) {
                  e.printStackTrace();
              }
  
          } catch (Exception e) {
              e.printStackTrace();
          }
  
          // TODO Auto-generated method stub
          return null;
      }
  
  }
  </code></pre>