我正在尝试在字符串数组中获取 sd 卡中存在的所有歌曲的路径,但它没有存储在数组中,否则它会覆盖它,请帮助我,代码....
String[] projection = new String[] {MediaStore.Audio.Media.DATA};
Cursor mCur = managedQuery(Media.EXTERNAL_CONTENT_URI,projection, null, null, null);
mCur.moveToFirst();
path=new String[mCur.getColumnCount()];
while (mCur.isAfterLast() == false) {
for (i=0; i<mCur.getColumnCount(); i++)
{path[i]=mCur.getString(i);
System.out.println(",,,,,,,,"+mCur.getColumnCount());
System.out.println(path[i]+i);}
mCur.moveToNext(); }