From fb13bfe8978edc18c5a14c98bcaed01c5308b11a Mon Sep 17 00:00:00 2001 From: Page Asgardius Date: Tue, 6 Sep 2022 03:34:14 -0700 Subject: [PATCH] unsupported file warning --- app/src/main/java/asgardius/page/s3manager/ObjectSelect.java | 5 +++-- app/src/main/res/values/strings.xml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/asgardius/page/s3manager/ObjectSelect.java b/app/src/main/java/asgardius/page/s3manager/ObjectSelect.java index 871c0c8..d643671 100644 --- a/app/src/main/java/asgardius/page/s3manager/ObjectSelect.java +++ b/app/src/main/java/asgardius/page/s3manager/ObjectSelect.java @@ -181,12 +181,13 @@ public class ObjectSelect extends AppCompatActivity { if (Img.get(position).equals(R.drawable.folder)) { //go to subfolder explorer(Name.get(position).toString()); - } - else { + } else if (Img.get(position).equals(R.drawable.audiofile) || Img.get(position).equals(R.drawable.videofile)) { //load media file GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucket, prefix + Name.get(position).toString()); URL objectURL = s3client.generatePresignedUrl(request); videoplayer(objectURL.toString()); + } else { + Toast.makeText(ObjectSelect.this, getResources().getString(R.string.unsupported_file), Toast.LENGTH_SHORT).show(); } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b3bbb97..f42b578 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -16,6 +16,7 @@ Connections without SSL are not allowed Endpoint URL must start with https:// File Explorer Test + Unsupported media file Video Test Cannot retrieve media file Invalid media file