首页 文章

无法播放下载的.mp3文件

提问于
浏览
0

我在应用程序中下载.mp3但我无法在Windows Media Player上播放 . 我尝试使用Microsoft Groove音乐播放器,Google Play音乐是我手机上内置的音乐播放器,但都不会打开它...只是媒体播放器:D所以你有什么想法可能是什么问题?

DownloadManager.Request request = new DownloadManager.Request(Uri.parse(mediaURL));
    request.allowScanningByMediaScanner();
    request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
    request.setMimeType("audio/MP3");
    request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, nameOfTheFile + "." + extension);

    DownloadManager manager = (DownloadManager) mContext.getSystemService(Context.DOWNLOAD_SERVICE);
    manager.enqueue(request);

如果我删除“request.setMimeType(”audio / MP3“);”线,媒体播放器仍然可以播放它 .

1 回答

  • 0

    好的,问题是我的文件名中有一个冒号...

相关问题