如何从内部存储共享音频文件

问题描述

   public void onShareClick(int position){
       String sharePath = Environment.getExternalStorageDirectory().getPath()
               + "/My Device/Allah_O_Akbar.mp3";
       Uri uri = Uri.parse("file://" + sharePath);
       Intent share = new Intent(Intent.ACTION_SEND);
       share.setType("audio/*");
       share.putExtra(Intent.EXTRA_STREAM,uri);
       startActivity(Intent.createChooser(share,"Share Sound File"));
   }

我正在使用此代码从 recylerview 菜单共享音频,当我共享音频时,它显示不支持文件格式的吐司"check image to understand error"

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)