Currently I cannot get a file downloaded from my AWS S3 bucket into my android studio app. I am using amplify client to do this.
I tried to test the app on a physical device, however it crashed as soon as I tested it. Here is the code
public void downloadFiles(){
Amplify.Storage.downloadFile(
"test.txt",
new File(getApplicationContext().getFilesDir() + "/download.txt"),
StorageDownloadFileOptions.defaultInstance(),
progress -> Log.i("MyAmplifyApp", "Fraction completed: " + progress.getFractionCompleted()),
result -> Log.i("MyAmplifyApp", "Successfully downloaded: " + result.getFile().getName()),
error -> Log.e("MyAmplifyApp", "Download Failure", error)
);
}