开发者

(Android) Downloading MP3 file with app (Content not support)

When I download MP3 files with my app they go to the download folder and when I navigate there and try to play them I get content not supported. I have looked around a little bit, but can't figure out why. Anyone know how I can 开发者_开发百科fix this, is it something with the MIME types? What does this do:

connection.setRequestProperty("Content-Type", "audio/*"); 


MP3 • Mono/Stereo 8-320Kbps constant (CBR) or variable bit-rate (VBR) MP3 (.mp3)

Android Supports MP3 in the above format. Incorrect encoding makes this type of error. Also check to see if the extension and file names are proper. Because some downloaders may name the file like mywebsite.com-mysong.mp3. The android OS may wrongly interpret the file as a .com file rather than a .mp3 file.

Reference:

http://developer.android.com/guide/appendix/media-formats.html#core


Please ensure you save with the .mp3 extension. sometimes it can get lost along the way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜