title: AsyncTask when is onPostExecute() not called?
body: <p>I am trying to ensure that I account for all possibilities to avoid errors for the user.</p>
  
  <p>I have a AsyncTask that implements an interface and returns a response to the calling class in onPostExecute of the AsyncTask as below:</p>
  
  <pre><code>public class GetVideoInfoFromDataBase extends AsyncTask {
  
      Context context;
      private AsyncInterface asyncInterface;
  
      // Paginated list of results for alarm database scan
      static PaginatedScanList&lt;AlarmDynamoMappingAdapter&gt; results;
  
      // The DynamoDB object mapper for accessing DynamoDB.
      private final DynamoDBMapper mapper;
  
      public GetVideoInfoFromDataBase(Context context, AsyncInterface asyncInterface){
          mapper = AWSMobileClient.defaultMobileClient().getDynamoDBMapper();
          this.context = context;
          this.asyncInterface = asyncInterface;
  
      }
  
      @Override
      protected Object doInBackground(Object[] params) {
          System.out.println("The backgrond stuff is working 1");
          DynamoDBScanExpression scanExpression = new DynamoDBScanExpression();
          results = mapper.scan(AlarmDynamoMappingAdapter.class, scanExpression);
          return results;
      }
  
      @Override
      public void onPostExecute(Object obj) {
  
             asyncInterface.response((PaginatedScanList&lt;AlarmDynamoMappingAdapter&gt; )obj);
      }
  }
  </code></pre>
  
  <p>Is there any time that onPostExecute would not be called meaning the interface would not return a value?</p>
  
  <p>Thanks in advance for your help.</p>