I have a problem. I'm creating an appplication for android with AS3 and the problem i´ve got it's that when I install the application in my android the directory I should create is doesn't appear and the file neither.
var dirPath:File = File.applicationStorageDirectory.resolvePath("MUSIC/");
var newFile:File = File.applicationStorageDirectory.resolvePath("songslist.xml");
if (!dirPath.exists)
{
dirPath.createDirectory();
stream.open(newFile, FileMode.WRITE);
stream.close();
trace("entra if");
}
if (!newFile.exists)
{
stream.open(newFile, FileMode.WRITE);
stream.close();
}
Could be the problem that I should write and isntall the app in sdcard ? and how can obtain later the root sdcard for searching all the existing *.mp3 files in the directories to add in my songslist.xml