В эмуляторе я пытаюсь записать в файл:
/mnt/sdcard/Android/data/com.Me.MyApp/files/myFile.txt
Я установил внешние разрешения на запись в манифесте, но продолжаю получать исключение не найденный файл,Эмулятор настроен на использование SD-карты.
Почему это может быть?
InputStream is = c.getResources().openRawResource(R.raw.my_raw_file);
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(is));
try
{
while (zis.getNextEntry() != null)
{
File destFile = new File(destinationPath);
// EXCEPTION THROWN NEXT LINE!
OutputStream os = new FileOutputStream(destFile);
byte[] buffer = new byte[BUF_SIZE];
int count;
while ((count = zis.read(buffer)) != -1)
{
os.write(buffer, 0, count);
}
}
}
catch (IOException e)
{
e.printStackTrace();
}
try
{
zis.close();
}
catch (IOException e)
{
e.printStackTrace();
}