title: Error uploading to s3 bucket on android
body: <p>I am trying to upload to S3 on android. However, it does not actually upload the image. The only thing resembling an error that I see is this:</p>
  
  <p>D/CognitoCachingCredentialsProvider: No valid credentials found in SharedPreferences</p>
  
  <p>However, when googling it I find various conflicting information. The only real thing I can find is that this can be caused by not properly adding the cognito framework to the project, but I have verified that it is in the build.gradle.</p>
  
  <p>I should also note that I have this working on iOS just fine using the same credentials. It was mentioned that I need to use a different identity pool per platform. So I created a new identity pool for Android and made sure I had matching permissions and it did not work either. Considering how iOS works fine and uploads the image without issue, I feel it has to be something with the code using on Android. I included that below.</p>
  
  <p>There is this function to get credentials from cognito</p>
  
  <pre><code>    private CognitoCachingCredentialsProvider getCreadentials(Context context) {
      CognitoCachingCredentialsProvider credentialsProvider = new CognitoCachingCredentialsProvider(
                      context.getApplicationContext(),
                      IDENTITY_POOL_ID,
                      Regions.US_EAST_1
              );
  
      return credentialsProvider;
  }
  </code></pre>
  
  <p>And then the function to actually save the image to S3</p>
  
  <pre><code>    public void saveImage(Context context, Bitmap data, String key, Double lat, Double lon) {
  
      exifBuilder = new ExifBuilder(mContext, lat, lon);
  
      File file = writeImageToFile(context, data);
      s3 = new AmazonS3Client(getCreadentials(context));
  
      if (file != null) {
  
          TransferUtility transferUtility = new TransferUtility(s3, context.getApplicationContext());
          TransferObserver observer = transferUtility.upload(
                  BUCKET_NAME,
                  key,
                  file
          );
      }
  }
  </code></pre>
  
  <p>I have verified that the file is not null. And also verified that it is the correct identity pool id.</p>
  
  <p>Does anything here stand out as missing?</p>