我目前正在使用这段代码-
fileName = recordings.get(position);
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
File file1 = new File(file.getAbsolutePath()+"/"+fileName);
intent.setDataAndType(Uri.fromFile(file1), "audio/*");
startActivity(intent);
但是我从Google播放音乐中敬酒,说“无法播放您要求的曲目”
最佳答案
是的,您的应用程序可以访问其自己的内部专用内存。但是其他应用程序不能。因此,如果其他应用程序必须播放音频文件,请不要将其放在此处。
内容提供商也许有可能。