title: get Response asyncTask and throw new Intent android
body: <p>How can i get the response of a asyncTask and change my UI?</p>
  
  <pre><code> public class LoginTask extends AsyncTask&lt;String, Void, Response&gt; {
  
          @Override
          protected Response doInBackground(String... params) {
              try {
                  Response response = get(params[0], params[1]);
                  responseString = response.body().string();
                  return response;
              } catch (IOException e) {
                  e.printStackTrace();
              }
              return null;
          }
  
          private Response get(String url, String base) throws IOException {
              Request request = new Request.Builder()
                      .url(url)
                      .addHeader("Authorization", "Basic " + base)
                      .build();
              return client.newCall(request).execute();
          }
      }
  </code></pre>
  
  <p>This is my loginTask that connect with my restful service. The webservice return a boolean with the result. If the user exist return true, if not return false.</p>
  
  <p>Here i received the boolean correctly:</p>
  
  <pre><code>Response response = get(params[0], params[1]);
                      responseString = response.body().string();
                      return response;
  </code></pre>
  
  <p>But i cant check if responseString is equals as false or true and it is true change my activity.</p>
  
  <p>How can i do that?</p>