title: AWS s3 TransferListener not updating in Android
body: <p>I am trying to download from s3 and update a progress bar. I set up TransferUtility, TransferObserver and TransferListener.</p>
  
  <p>The problem is that as the file downloads it only updates progress rarely. </p>
  
  <p>For a 1.6mb (1665824) file it will output 0, then 30 seconds later 1050264, then 30 seconds later 1665824, then it repeats itself and outputs 1665824 again.</p>
  
  <p>So basically to the user it looks like the download is frozen or at best jerky. </p>
  
  <p>I also tried putting it in a loop and checking the value ever 100ms but it just returns 0s for the first thiry seconds just like the listener.</p>
  
  <p>This is how I am implementing it:</p>
  
  <pre><code>// Create s3 client and set region and endpoints
          AmazonS3Client s3Client = new AmazonS3Client(IdentityManager.getDefaultIdentityManager().getCredentialsProvider(), new ClientConfiguration());
          s3Client.setRegion(Region.getRegion(Regions.US_EAST_1));
  
          // Create a tranfer utility and attach to s3 client
          TransferUtility transferUtility = TransferUtility.builder().s3Client(s3Client).context(getActivity()).build();
  
          // String key for the file to download
          String key = "ExampleVideo.mp4";
  
          // Location to download files from S3
          File file = new File(Environment.getExternalStorageDirectory().toString() + "/" + key);
  
          if(!file.exists()){
              try {
                  file.createNewFile();
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
  
          // Bucket that contains the file to download
          String bucket = "My_Bucket";
  
          // Create a tranfer observer to download
          TransferObserver observer = transferUtility.download(bucket,key,file);
  
          // Attach listener to the download to listen for changes in the the download process
          observer.setTransferListener(new TransferListener() {
              @Override
              public void onStateChanged(int id, TransferState state) {
  
              }
  
              @Override
              public void onProgressChanged(int id, long bytesCurrent, long bytesTotal) {
  
              }
  
              @Override
              public void onError(int id, Exception ex) {
  
              }
          }); 
  </code></pre>
  
  <p>Thanks for your help</p>