diff --git a/android/README.md b/android/README.md index 6edb656..9ad20cf 100644 --- a/android/README.md +++ b/android/README.md @@ -47,6 +47,15 @@ Add What ever Want to share MIME Type so only include you want to share your App + + + + + + + + + ``` diff --git a/android/src/main/java/com/ajithab/RNFileShareIntentModule.java b/android/src/main/java/com/ajithab/RNFileShareIntentModule.java index ec00b52..84989c5 100644 --- a/android/src/main/java/com/ajithab/RNFileShareIntentModule.java +++ b/android/src/main/java/com/ajithab/RNFileShareIntentModule.java @@ -49,7 +49,7 @@ public void getFilepath(Callback successCallback) { if ("text/plain".equals(type)) { String input = intent.getStringExtra(Intent.EXTRA_TEXT); successCallback.invoke(input); - } else if (type.startsWith("image/") || type.startsWith("video/") || type.startsWith("application/")) { + } else if (type.startsWith("image/") || type.startsWith("video/") || type.startsWith("application/") || type.startsWith("audio/")) { Uri fileUri = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM); if (fileUri != null) { successCallback.invoke(fileUri.toString()); @@ -58,7 +58,7 @@ public void getFilepath(Callback successCallback) { Toast.makeText(reactContext, "Type is not support", Toast.LENGTH_SHORT).show(); } } else if (Intent.ACTION_SEND_MULTIPLE.equals(action) && type != null) { - if (type.startsWith("image/") || type.startsWith("video/") || type.startsWith("application/")) { + if (type.startsWith("image/") || type.startsWith("video/") || type.startsWith("application/") || type.startsWith("*/") || type.startsWith("audio/")) { ArrayList fileUris = intent.getParcelableArrayListExtra(Intent.EXTRA_STREAM); if (fileUris != null) { String completeString = new String(); @@ -91,4 +91,4 @@ public void clearFilePath() { public String getName() { return "RNFileShareIntent"; } -} \ No newline at end of file +}