android share audio file from assets folder
问题 I can't share audio file from assets. Each app says that it can't send the file. Method for converting inputstream to temporary file public File getFile(String Prefix, String Suffix) throws IOException { File tempFile = File.createTempFile(Prefix, Suffix); AssetFileDescriptor tempafd = FXActivity.getInstance().getAssets().openFd(filepath); tempFile.deleteOnExit(); FileOutputStream out = new FileOutputStream(tempFile); IOUtils.copy(tempafd.createInputStream(), out); return tempFile; } Sharing