From f5250df4b9a63fc32e202160d3639346a5b94bd0 Mon Sep 17 00:00:00 2001 From: Wayne Scholar Date: Mon, 16 Sep 2019 10:07:13 -0400 Subject: [PATCH] Fix to select video file Fixed to enable selecting videos. --- .../java/com/snapchat/kit/creativesample/MainActivity.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/android/creative-sample-app/src/main/java/com/snapchat/kit/creativesample/MainActivity.java b/android/creative-sample-app/src/main/java/com/snapchat/kit/creativesample/MainActivity.java index f21e757..a58550f 100644 --- a/android/creative-sample-app/src/main/java/com/snapchat/kit/creativesample/MainActivity.java +++ b/android/creative-sample-app/src/main/java/com/snapchat/kit/creativesample/MainActivity.java @@ -208,7 +208,12 @@ public void onClick(DialogInterface dialog, int which) { private void selectMediaFromGallery(String mimeType, int resultCode) { Intent intent = new Intent(Intent.ACTION_PICK); - intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, mimeType); + if(mimeType=="video/*"){ + intent.setDataAndType(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, mimeType); + } + else{ + intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, mimeType); + } startActivityForResult(intent, resultCode); }