2

我为我的应用程序附加了音频或视频。当我打开邮件时,我收到了音频或视频。但我的问题是当我收到音频时,我可以在 gmail 中找到两个播放和下载选项,当我尝试视频时,我可以只找到附加视频的下载选项..我想要像音频这样的播放选项..这是我的代码

try {                   
                    String fun1 = Environment.getExternalStorageDirectory()
                    + "/hi.3gp";
                    Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
                    sharingIntent.setType("email/text");

                    sharingIntent.setType("video/3gp");

                    sharingIntent.putExtra(android.content.Intent.EXTRA_STREAM,
                            Uri.parse("file://" + fun1));
                    String shareBody = "Here is the share content body";
                    sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject Here");
                    sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
                    startActivity(Intent.createChooser(sharingIntent, "Send via"));

                } catch (Throwable t) {
                    Toast.makeText(getApplicationContext(), "error",
                            Toast.LENGTH_LONG).show();
                }
4

0 回答 0