本文介绍了需要在SD卡扫描.mp3文件援助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图让一个音乐播放器应用程序,并作为我刚开始的Andr​​oid,可以在任何一个可以告诉我,我该怎么accces在我的SD卡中的音乐文件,我已经给了SD卡的位置为\\ SD卡\\我的字符串变量MEDIA_PATH,但是之后呢?应该如何访问系统上的音乐文件把它更简单地用mp3格式结尾的文件,我不知道要使用哪个函数。我倒是AP preciate您的建议,谢谢。

I have been trying to make a music player application,and as I have just started android, Could any one tell me how can I accces the music files in my sdcard, I have given the location of the sdcard as "\sdcard\" in my String variable MEDIA_PATH ,but what after that? How should the system access the music files put it more simply the files ending with .mp3 format,I don't know which function to use. I'd appreciate your suggestions, thanks.

推荐答案

使用 MediaStore android.provider.MediaStore 你可以得到所有的音乐文件,只要看看这个漂亮的教程

Using MediaStore from android.provider.MediaStore you can get all music files, Just look at this nice Tutorial Displaying the List of music files Stored in SD card and playing music in the background

这篇关于需要在SD卡扫描.mp3文件援助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 22:56